Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-27-2008, 04:38 AM
vigilant_death2 vigilant_death2 is offline
Registered User
Join Date: Sep 2003
Location: n/a
Posts: 25
vigilant_death2 is on a distinguished road
Send a message via AIM to vigilant_death2 Send a message via Yahoo to vigilant_death2
Hiding all gui controls

Is there a way to hide every gui control at once?
I am making a replica of the offline tile editor and want it to go into a similar mode when the player presses F4 so i will need to hide all of them o_O
__________________
-Neo
Reply With Quote
  #2  
Old 02-27-2008, 04:39 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
something like
PHP Code:
for ( temp.GraalControl.controls )
{
  
temp.n.hide();

may work.
__________________
Reply With Quote
  #3  
Old 02-27-2008, 04:44 AM
vigilant_death2 vigilant_death2 is offline
Registered User
Join Date: Sep 2003
Location: n/a
Posts: 25
vigilant_death2 is on a distinguished road
Send a message via AIM to vigilant_death2 Send a message via Yahoo to vigilant_death2
Lol I guess I can do GraalControl.hide() but was hoping for a better method ^_^
__________________
-Neo
Reply With Quote
  #4  
Old 02-27-2008, 04:54 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by vigilant_death2 View Post
Lol I guess I can do GraalControl.hide() but was hoping for a better method ^_^
Like I said, go through all of GraalControl's controls, and hide them individually.
__________________
Reply With Quote
  #5  
Old 02-27-2008, 05:13 AM
vigilant_death2 vigilant_death2 is offline
Registered User
Join Date: Sep 2003
Location: n/a
Posts: 25
vigilant_death2 is on a distinguished road
Send a message via AIM to vigilant_death2 Send a message via Yahoo to vigilant_death2
Ah yes I see what you meant now makes more sense :P ty
__________________
-Neo
Reply With Quote
  #6  
Old 02-27-2008, 11:22 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Just so you know, GUIContainer is the top-level control, not GraalControl. You probably don't want to hide stuff outside of GraalControl though.
__________________
Reply With Quote
  #7  
Old 02-27-2008, 12:32 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
GraalControl.hide() would be more efficient and most likely better.
__________________
Do it with a DON!
Reply With Quote
  #8  
Old 02-27-2008, 11:26 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by zokemon View Post
GraalControl.hide() would be more efficient and most likely better.
I would tend to agree ... wasn't sure if it was locked or anything so I didn't suggest it.

Problem would be if you go back to show everything, then things which where hidden appear. I guess you could have an array ... but ehh ... easier to use GraalControl.hide();
__________________
Reply With Quote
  #9  
Old 02-28-2008, 02:45 AM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004
Quote:
Originally Posted by cbkbud View Post
Problem would be if you go back to show everything, then things which where hidden appear. I guess you could have an array ... but ehh ... easier to use GraalControl.hide();
I don't think this is an issue seeing all controls inherit their own 'visible' property.
__________________
◕‿‿◕ · pfa · check yer syntax! · src

Killa Be: when i got that locker in 6th grade the only thing in it was a picture of a midget useing a firehose :/
Reply With Quote
  #10  
Old 02-28-2008, 03:36 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Tolnaftate2004 View Post
I don't think this is an issue seeing all controls inherit their own 'visible' property.
Yes, I'm saying that if you hid each individually, you may have problems when it comes to reshowing them
__________________
Reply With Quote
  #11  
Old 02-28-2008, 07:59 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by cbkbud View Post
Yes, I'm saying that if you hid each individually, you may have problems when it comes to reshowing them
Which is exactly why you use GraalControl.hide();
I've made many GUIs outside of GraalControl for editors and such and I know that GraalControl.hide() is most likely your best bet.
__________________
Do it with a DON!
Reply With Quote
  #12  
Old 02-28-2008, 08:47 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by zokemon View Post
Which is exactly why you use GraalControl.hide();
I've made many GUIs outside of GraalControl for editors and such and I know that GraalControl.hide() is most likely your best bet.
How would you create a new GUI Control outside of GraalControl though?
Reply With Quote
  #13  
Old 02-28-2008, 08:53 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
PHP Code:
object.isexternal boolean
Not yet implemented.
__________________
Reply With Quote
  #14  
Old 02-29-2008, 04:21 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by xAndrewx View Post
PHP Code:
object.isexternal boolean
Not yet implemented.
Ehh ... isn't that players[i].external ... meaning if they are IRC or on another server?

You can just do something like this:

PHP Code:
with GUIContainer )
{
  new 
GuiWindowCtrl() // etc

or I believe
PHP Code:
new GuiWindowCtrl"s" )
{
  
}
GUIContainer.addControl); 
__________________
Reply With Quote
  #15  
Old 02-29-2008, 05:23 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by cbkbud View Post
Ehh ... isn't that players[i].external ... meaning if they are IRC or on another server?

You can just do something like this:

PHP Code:
with GUIContainer )
{
  new 
GuiWindowCtrl() // etc

or I believe
PHP Code:
new GuiWindowCtrl"s" )
{
  
}
GUIContainer.addControl); 
Exactly. I often do:
PHP Code:
new GuiWindowCtrl("foo") {
  
GUIContainer.addControl(this);

__________________
Do it with a DON!
Reply With Quote
  #16  
Old 02-29-2008, 02:58 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Thanks you two.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 08:15 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.