Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   Create GuiWindowCtrl while still moving... (https://forums.graalonline.com/forums/showthread.php?t=70622)

Gamerkid7 12-07-2006 12:45 AM

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!

Skyld 12-07-2006 12:57 AM

Not sure if something like this would work or not.
PHP Code:

GraalControl.makeFirstResponder(true); 


Gamerkid7 12-07-2006 04:48 AM

Quote:

Originally Posted by Skyld (Post 1250910)
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...

Andy0687 12-07-2006 04:50 AM

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.

Gamerkid7 12-07-2006 05:52 AM

That worked perfectly, Thanks!

Admins 12-07-2006 01:02 PM

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.

Andy0687 12-08-2006 10:22 PM

Quote:

Originally Posted by Stefan (Post 1251119)
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?

Admins 12-08-2006 10:50 PM

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.


All times are GMT +2. The time now is 12:23 AM.

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