Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length.
 
Entire Forum
This board
This topic
Members
Entire Site
Home
FAQ
Help
Bug and Suggestion Tracker
Search
AGS Wiki
AGS Games
Login
Register
Game authors and players, please read
this thread
!
Adventure Game Studio | Forums
|
AGS Support
|
Beginners' Technical Questions
(Moderator:
Iceboty V7000a
) |
Topic:
Iterating through GUIs to set them not visible.
« previous
next »
Print
Pages: [
1
]
Author
Topic: Iterating through GUIs to set them not visible. (Read 179 times)
Tweet
Share
Sslaxx
Iterating through GUIs to set them not visible.
«
on:
10 Nov 2010, 14:27 »
I'm wondering if there's an easy way of iterating through GUIs and setting them all to be not visible (otherwise I can theoretically have save and load dialogues be enabled at the same time, for example).
Logged
Stuart "Sslaxx" Moore.
barefoot
Guitar Man
Re: Iterating through GUIs to set them not visible.
«
Reply #1 on:
10 Nov 2010, 14:35 »
Hi
do you mean something like this? The folllowing is something i have:
[code]
gSymbols.Visible = false;
gNotes.Visible = false;
gClose.Visible = false;
gRun.Visible = false;
gWalk.Visible = false;
gInv.Visible = false;
gsave.Visible = false;
gGui4.Visible = true;
gload.Visible = true;
gIconbar2.Visible = false;
[/code]
barefoot
Logged
I May Not Be Perfect but I Have A Big Heart ..
Calin Leafshade
AGS Project Admins
Long live King Cat!
Re: Iterating through GUIs to set them not visible.
«
Reply #2 on:
10 Nov 2010, 14:37 »
i think there is a Gui array somewhere.
something like Game.Guis[]
EDIT: No wait its a global array.
so you can just do
[code]
int i = 0;
while (i < Game.GuiCount){
gui
.Visibile = false
}
[/code]
«
Last Edit: 10 Nov 2010, 14:39 by Calin Leafshade
»
Logged
Leon: You need the sword first before you can get the monkey.
Sslaxx
Re: Iterating through GUIs to set them not visible.
«
Reply #3 on:
10 Nov 2010, 14:46 »
Ah, case sensitivity strikes again (was using GUI instead, doh). Cheers, Calin!
Logged
Stuart "Sslaxx" Moore.
monkey_05_06
AGS Project Admins
Has left the building.
Re: Iterating through GUIs to set them not visible.
«
Reply #4 on:
11 Nov 2010, 03:41 »
Just to be completely clear,
GUI
(all caps) refers to the
type
whereas
gui
(all lower-case) refers to the global array of instances of the GUI type.
Logged
Let's be honest. Most people suck at coding. I suck at coding, but at least my code is readable. To Hell with anyone too lazy to maintain consistent formatting in their code. I could deal with bad interfaces and structure if I could even read your horrible code. And that's putting it nicely. -monkey
Print
Pages: [
1
]
« previous
next »
Adventure Game Studio | Forums
|
AGS Support
|
Beginners' Technical Questions
(Moderator:
Iceboty V7000a
) |
Topic:
Iterating through GUIs to set them not visible.