Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-09-2006, 06:09 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
GUI onClose?

Is there a way to detect when a GUI gets closed?
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #2  
Old 02-09-2006, 07:04 PM
Kronan Kronan is offline
yo
Kronan's Avatar
Join Date: May 2001
Location: Florida, USA
Posts: 682
Kronan is on a distinguished road
Send a message via ICQ to Kronan Send a message via AIM to Kronan Send a message via Yahoo to Kronan
You probably can make your own function to check, other than that i'm not sure.
__________________
Reply With Quote
  #3  
Old 02-09-2006, 10:43 PM
Ajira Ajira is offline
Poont.
Join Date: Oct 2004
Location: NY, USA
Posts: 477
Ajira is on a distinguished road
I'm pretty sure there's a var like CloseQuery = "true"; and I think that calls a function.
__________________
Liek omigosh.


Last edited by Ajira; 02-10-2006 at 12:31 AM.. Reason: wrong varname
Reply With Quote
  #4  
Old 02-09-2006, 11:00 PM
Rick Rick is offline
PipBoy Extraordinaire!
Rick's Avatar
Join Date: Jul 2004
Location: Long Beach, California.
Posts: 831
Rick is on a distinguished road
Quote:
Originally Posted by Ajira
I'm pretty sure there's a var like onCloseQuery = "true"; and I think that calls a function.
I think you're thinking about destroyOnClose. Could be wrong though.
Reply With Quote
  #5  
Old 02-10-2006, 12:30 AM
Ajira Ajira is offline
Poont.
Join Date: Oct 2004
Location: NY, USA
Posts: 477
Ajira is on a distinguished road
Quote:
Originally Posted by Rick
I think you're thinking about destroyOnClose. Could be wrong though.
I believe you're wrong.

Edit: Sorry, it's closequery = "true"; but I'm not sure what the function is that is called from this.
__________________
Liek omigosh.

Reply With Quote
  #6  
Old 02-10-2006, 08:34 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
In the future, please post GS2-specific questions in the GS2 forum.

I'm moving this one for you.
Reply With Quote
  #7  
Old 02-10-2006, 03:16 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by Ajira
I believe you're wrong.

Edit: Sorry, it's closequery = "true"; but I'm not sure what the function is that is called from this.
I'm pretty sure it just sends onClose() or onQueryClose() I can check when I get home if still no one is certain.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #8  
Old 02-10-2006, 09:45 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
onClose() doesnt work, I have yet to try onQueryClose().

EDIT: Cant get any of them to work..
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #9  
Old 02-16-2006, 05:36 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
*bumps*

I kinda still need help with this..
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #10  
Old 02-17-2006, 03:39 AM
Ajira Ajira is offline
Poont.
Join Date: Oct 2004
Location: NY, USA
Posts: 477
Ajira is on a distinguished road
Quote:
Originally Posted by xXziroXx
onClose() doesnt work, I have yet to try onQueryClose().

EDIT: Cant get any of them to work..
Try onCloseQuery()?
__________________
Liek omigosh.

Reply With Quote
  #11  
Old 02-17-2006, 07:15 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
I did, didnt work.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #12  
Old 02-18-2006, 09:34 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by xXziroXx
I did, didnt work.
set the window property:
closequery = true;

then use:
function WindowName.onCloseQuery() {
}


Note: If I recall correctly, if you use this method you have to manually call .destroy() in the onCloseQuery() handler.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #13  
Old 02-18-2006, 04:09 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Im pretty sure I tried that, but now it works so I must´ve missed something the alst time I tried it.. Thanks Okiesmokie!
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #14  
Old 02-18-2006, 04:41 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
I thought it was something like this?
PHP Code:
function onClose(obj)
{
  
// obj is the GUI window in question
  
obj.destroy();

__________________
Skyld
Reply With Quote
  #15  
Old 02-23-2006, 02:32 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
You can also use onShow(), onHide(), onWake(), onSleep().
Need to add all events and description to the wiki.graal.net I think

Last edited by Admins; 02-25-2006 at 09:55 PM..
Reply With Quote
  #16  
Old 02-23-2006, 03:35 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by Skyld
I thought it was something like this?
PHP Code:
function onClose(obj)
{
  
// obj is the GUI window in question
  
obj.destroy();

I thought so too, but he said it didn't work for him
Also, I don't think you have to call obj.destroy() in onClose.

Quote:
Originally Posted by Stefan
Need to add all events and description to the wiki.graal.net I think
I agree
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #17  
Old 02-25-2006, 09:57 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Ok added like all events to the description of the GuiControls at http://wiki.graal.net/index.php/Crea.../Script/Client .

I have also added some variables (rows[], icon etc.) which are not listed by "-listscriptfunctions" and were not mentioned in the wiki before.
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 10:57 AM.


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