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 06-19-2006, 07:06 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 *blocking*

How can you make it so GUIs doesnt *block* - meaning that if a GUI is showed you have to click outside of it to be able to move etc.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #2  
Old 06-19-2006, 07:57 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
GraalControl.makefirstresponder() after you create the window works, I think.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #3  
Old 06-19-2006, 08:14 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
Didnt work.. Tried putting it IN "new control blah", tried putting it after - also tried in a timeout.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #4  
Old 06-19-2006, 09:35 PM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
GraalControl.BringToFront();

I don't remember off hand if you there's a 'focused' variable in the GUI controls.. Otherwise, just make it so that if the GUI window is clicked it brings GraalControl to the front.
Reply With Quote
  #5  
Old 06-20-2006, 12:12 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by xXziroXx
Didnt work.. Tried putting it IN "new control blah", tried putting it after - also tried in a timeout.
I think there's more to the syntax, I was just giving you the function name.
Try: GraalControl.makefirstresponder(true);
or if that doesn't work, NameOfYourWindow.makefirstresponder(false);

Quote:
Originally Posted by Yen
I don't remember off hand if you there's a 'focused' variable in the GUI controls.. Otherwise, just make it so that if the GUI window is clicked it brings GraalControl to the front.
ControlName.isfirstresponder(); will tell you if it's focused or not.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #6  
Old 06-20-2006, 04:38 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
Got it to work:

PHP Code:
new GuiWindowCtrl("guiname") {
  
// stuff
}
guiname.makefirstresponder(false); 
And Yen, you are wrong with bringtofront()! bringtofront brings a GUI on top of all other GUIs, and vice versa with pushtoback().
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #7  
Old 06-20-2006, 05:44 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by xXziroXx
Got it to work:

PHP Code:
new GuiWindowCtrl("guiname") {
  
// stuff
}
guiname.makefirstresponder(false); 
And Yen, you are wrong with bringtofront()! bringtofront brings a GUI on top of all other GUIs, and vice versa with pushtoback().
Hence the reason he suggested to use bringtofront() with the GraalControl.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #8  
Old 06-20-2006, 05:58 PM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
Quote:
Originally Posted by xXziroXx
And Yen, you are wrong with bringtofront()! bringtofront brings a GUI on top of all other GUIs, and vice versa with pushtoback().
O_o
I use 'pushtoback()' to take focus off my GUIs when I create them..
Reply With Quote
  #9  
Old 06-23-2006, 06:57 AM
Warcaptain Warcaptain is offline
Banned
Warcaptain's Avatar
Join Date: Jun 2001
Location: Virginia, USA
Posts: 2,086
Warcaptain is on a distinguished road
Send a message via ICQ to Warcaptain Send a message via AIM to Warcaptain Send a message via Yahoo to Warcaptain
You can also do:
PHP Code:
function OBJ.onMouseDown()  GraalControl.showtop(); 
or also (to make it universal) could put this in the GUI creation:

PHP Code:
obj = new GuiWindowCtrl("obj");
with (obj){
  
//stuff
  
thiso.catchevent(this,"onMouseDown","onFocusOut");
}
function 
onFocusOut(){
  
GraalControl.showtop();

But if you are resizing the GraalControl for some reason, showtop will mess it up sometimes.. so be careful
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 02:34 PM.


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