Page 1 of 1
Focus is not working for me
Posted: Tue Mar 17, 2009 01:18
by leonardoalt
I want to add keyboard input to my Menu. Mouse input is working great.
I did w->activate() when something i decided happens, but it didn't get the "effect" (focus) that it gets when the mouse is over it.
Any ideia of what i need to do?
Thanks.
Posted: Tue Mar 17, 2009 11:30
by CrazyEddie
Hi,
Perhaps the input is actually ending up with a child window of 'w'? You could try w->getActiveChild and deactivate it, or something? Though having said that, it's probably not really what you want to be doing.
CE
Posted: Tue Mar 17, 2009 16:42
by leonardoalt
W, in this case is a PushButton.
In the method, i got the WindowManager*, and from it, got the button i wanted:
Window* w = WMngr->getWindow("ContinueButton");
w->activate();
Posted: Wed Mar 18, 2009 00:24
by leonardoalt
I don't know if it helps, but i tryed the methods "hide()" and "setEnabled(false)" instead of "activate()", and both worked, only "activate()" didn't.
Posted: Wed Mar 18, 2009 09:31
by CrazyEddie
I think I misunderstood, in my first response.
In order to get the 'hover' effect currently requires that the mouse be over the button. What this means is that when implementing a keyboard interface you basically have to move the mouse around programmatically to achieve these effects; there is no other way to do this currently, which means if you want your keyboard interface and the user to have control of the mouse, you'll end up rewriting sections of CEGUI.
CE.
Posted: Fri Mar 20, 2009 00:05
by leonardoalt
Hmmmm, i understood.
Thanks for the informations, CE.
Best regards, Leonardo.