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 06-05-2013, 03:51 AM
baseman101 baseman101 is offline
Scripter
baseman101's Avatar
Join Date: Nov 2012
Location: Purcellville, VA
Posts: 76
baseman101 will become famous soon enough
Close All Open GUIs?

I work on a server, but there is a problem I have where I need to close all open GUIs. How would I go around doing so? Thanks. Example:

PHP Code:
//#CLIENTSIDE
Window1.destroy();
Window2.destroy();
Window3.destroy(); 
=>
PHP Code:
//#CLIENTSIDE
for(temp.windows allopenwindows) {
  
temp.windows.destroy();

Reply With Quote
  #2  
Old 06-05-2013, 04:35 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
It's either GraalControl or GUIContainer (not sure...), but you can do it like this:

PHP Code:
for (temp.ctrlGUIContainer.controls) {
  if (
temp.ctrl.name.pos("Window") >= 0) {
    
temp.ctrl.hide();
  }

__________________
Quote:
Reply With Quote
  #3  
Old 06-05-2013, 04:41 AM
baseman101 baseman101 is offline
Scripter
baseman101's Avatar
Join Date: Nov 2012
Location: Purcellville, VA
Posts: 76
baseman101 will become famous soon enough
Thank you, I will test it straight away.
Reply With Quote
  #4  
Old 06-05-2013, 05:00 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 fowlplay4 View Post
It's either GraalControl or GUIContainer (not sure...)
GraalControl is a child of GUIContainer. GUIContainer is the entire window and contains stuff like the trial upgrade nag bar and the task bar. GraalControl contains just the game. In 99% of circumstances you will only need to deal with GraalControl. In this case he wants GraalControl (all windows are children of GraalControl by default).

Additionally, it might be more robust to check:

PHP Code:
if (temp.ctrl.objectType() == "GuiWindowCtrl") { 
__________________
Reply With Quote
  #5  
Old 06-05-2013, 08:53 PM
BlueMelon BlueMelon is offline
asdfg
BlueMelon's Avatar
Join Date: Sep 2008
Posts: 1,481
BlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to behold
This tool might be of use to you or others in the future.

GUI Explorer - by fp4
http://forums.graalonline.com/forums...hp?t=134257984
__________________
http://i.imgur.com/OOJbW.jpg
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 07:08 PM.


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