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 12-07-2006, 12:45 AM
Gamerkid7 Gamerkid7 is offline
Registered User
Join Date: May 2006
Posts: 10
Gamerkid7 is an unknown quantity at this point
Create GuiWindowCtrl while still moving...

I'm wondering if there is any variable to set or function to call that will let me create a GuiWindowCtrl that doesn't stop the player from moving when it appears. I wanted to use a GUI window for an event message but if someone is sparring, etc., the message would pop up and he wouldn't be able to move until he click out of the window... I've tried calling pushtoback() but that still stop's the player's movements when the window appears. Any help will be greatly appreatiated!
Reply With Quote
  #2  
Old 12-07-2006, 12:57 AM
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
Not sure if something like this would work or not.
PHP Code:
GraalControl.makeFirstResponder(true); 
__________________
Skyld
Reply With Quote
  #3  
Old 12-07-2006, 04:48 AM
Gamerkid7 Gamerkid7 is offline
Registered User
Join Date: May 2006
Posts: 10
Gamerkid7 is an unknown quantity at this point
Quote:
Originally Posted by Skyld View Post
Not sure if something like this would work or not.
PHP Code:
GraalControl.makeFirstResponder(true); 
I tried it but the player's movement is still stopped...
Reply With Quote
  #4  
Old 12-07-2006, 04:50 AM
Andy0687 Andy0687 is offline
Enigma
Join Date: Feb 2002
Posts: 1,072
Andy0687 is on a distinguished road
PHP Code:
GraalControl.makeFirstResponder("false"); 
Put it after the new GuiWindowCtrl() code, for example

PHP Code:
new GuiWindowCtrl(Window) {
 
//other stuff;
}
GraalControl.makeFirstResponder("false"); 
Then you are all set.
Reply With Quote
  #5  
Old 12-07-2006, 05:52 AM
Gamerkid7 Gamerkid7 is offline
Registered User
Join Date: May 2006
Posts: 10
Gamerkid7 is an unknown quantity at this point
That worked perfectly, Thanks!
Reply With Quote
  #6  
Old 12-07-2006, 01:02 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
In the next Graal version some bugs will be fixed which always focussed new controls, you will be able to add new controls that don't steal the input by using a non-modal GUI profile.
Reply With Quote
  #7  
Old 12-08-2006, 10:22 PM
Andy0687 Andy0687 is offline
Enigma
Join Date: Feb 2002
Posts: 1,072
Andy0687 is on a distinguished road
Quote:
Originally Posted by Stefan View Post
In the next Graal version some bugs will be fixed which always focussed new controls, you will be able to add new controls that don't steal the input by using a non-modal GUI profile.
Does it really seem like a bug to anyone else though when you can just set makeFirstResponder to false? If you take away the focus, then you have to set it to true to get focus to the GUI, or rely on the user to think of clicking the GUI, then you theoritically have the same problem right?
Reply With Quote
  #8  
Old 12-08-2006, 10:50 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
He just wants to display some stats or message, which should not get the keyboard focus. Right now each new control receives the keyboard focus, no matter what profile or behaviour you have set. That will be fixed in the next version, so that you can do controls which just show graphics and don't steal the input. If you add controls that can receive mouse clicks then you will need to switch the focus back yourself, like you showed.
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:50 AM.


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