PDA

View Full Version : Create GuiWindowCtrl while still moving...


Gamerkid7
12-07-2006, 12:45 AM
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.
GraalControl.makeFirstResponder(true);

Gamerkid7
12-07-2006, 04:48 AM
Not sure if something like this would work or not.
GraalControl.makeFirstResponder(true);
I tried it but the player's movement is still stopped...

Andy0687
12-07-2006, 04:50 AM
GraalControl.makeFirstResponder("false");

Put it after the new GuiWindowCtrl() code, for example


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
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.