hi
how can i find out if CEGUI handled key and mouse input?
if i inject the event using System.injectXYZ i alway get true as an answer even if i click on a space on the screen where no window is.
thanks
z
Know if CEGUI handled key/mouse input
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Know if CEGUI handled key/mouse input
This is a bug in the processing of MouseButtonDown events for the left mouse button; as far as I know everything else whould work okay. I'll fix this bug today
CE
CE
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Know if CEGUI handled key/mouse input
Okay, this was not actually the bug I thought it was
I think the problem is being caused by the fact that your root window is consuming the input and flagging it as handled. When the mouse is not within any window, the input will always gets sent to the root window (there are many reasons for this). The solution is to make use of the DefaultGUISheet (now known as DefaultWindow), and use this as the root, adding your other windows to it. DefautlWindow does not consume inputs and therefore you'll get the behaviour you expect.
HTH
CE.
I think the problem is being caused by the fact that your root window is consuming the input and flagging it as handled. When the mouse is not within any window, the input will always gets sent to the root window (there are many reasons for this). The solution is to make use of the DefaultGUISheet (now known as DefaultWindow), and use this as the root, adding your other windows to it. DefautlWindow does not consume inputs and therefore you'll get the behaviour you expect.
HTH
CE.
Know if CEGUI handled key/mouse input
Hi
Thanks for the tip.
Maybe I'm using the windows in a wrong way?
On application start I create a root window of the type "DefaultGUISheet" and set this with system.setGUISheet(myroot);
Then I load all my menus (defined in xmls) and make them children of "myroot". To Switch between menus I enable/disable the specific window and set the visibility. maybe this is wrong and i should instead switch the GUISheet between menus?
Anyway the strange thing is I do not handle any events fired by the root window. I only handle events in the child windows i load via xml.
*shrug*, I'll post a repost when I found what I'm doing wrong
Thanks
Tom
Thanks for the tip.
Maybe I'm using the windows in a wrong way?
On application start I create a root window of the type "DefaultGUISheet" and set this with system.setGUISheet(myroot);
Then I load all my menus (defined in xmls) and make them children of "myroot". To Switch between menus I enable/disable the specific window and set the visibility. maybe this is wrong and i should instead switch the GUISheet between menus?
Anyway the strange thing is I do not handle any events fired by the root window. I only handle events in the child windows i load via xml.
*shrug*, I'll post a repost when I found what I'm doing wrong
Thanks
Tom
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Know if CEGUI handled key/mouse input
Hmmm, that's very odd then I did a small test before my earlier post, and had a frame window attached to a DefaultGUISheet which was set as root. Any mouse event not within the frame window was correctly returned as non handled.
Key inputs are slightly different, as they go to the 'active' window, so for these to be reported as unhandled, you'd need to detect when the mouse leaves your Gui area, and deactivate some appropriate windows.
Let me know what happens next
CE.
Key inputs are slightly different, as they go to the 'active' window, so for these to be reported as unhandled, you'd need to detect when the mouse leaves your Gui area, and deactivate some appropriate windows.
Let me know what happens next
CE.
Know if CEGUI handled key/mouse input
as I thought, it's completely my fault.
I have made some test and therefore added between my root DefautlGUISheet and the menus a frameless window with no titlebar that covered the whole screen. in the window i was monitoring every mouse and key input and returned an each event 'true' which is false
anyway thanks for the help.
I have made some test and therefore added between my root DefautlGUISheet and the menus a frameless window with no titlebar that covered the whole screen. in the window i was monitoring every mouse and key input and returned an each event 'true' which is false
anyway thanks for the help.
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 5 guests