I'm having a problem with injectMouseButtonDown().
It's returning true (so CEGUI is handling it) when it shouldn't be.
There are no windows visible, all modal states are false.
Yet it returns true (and thus I don't pass the event on to the game).
It only happens the first time during app run, never again.
Can you think of any reason it would return true, despite the fact that no windows are visible/modal?
Input injection eating input
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Hi,
I suspect a root window is not hidden (obviously you can't see it, as it's invisible). Something like:
would confirm.
HTH
CE.
I suspect a root window is not hidden (obviously you can't see it, as it's invisible). Something like:
Code: Select all
CEGUI::Window* root =
CEGUI::System::getSingleton().getGUISheet();
if ( root && root->isVisible())
{
initiateSelfDestruct();
}
would confirm.
HTH
CE.
Darn! I thought that would be it, but I don't think so.
Test code:
It prints:
So the GUISheet exists but is not visible, yet it's receiving input.
For now I think I'll try to just setGUISheet(NULL) when nothing is visible.
Test code:
Code: Select all
//switch (EventType)
//case MouseButtonDown:
printf("GUI::MouseButtonDown\n");
if (NULL != mSystem->getGUISheet())
{
printf("GUISheet exists\n");
if (mSystem->getGUISheet()->isVisible())
printf("GUISheet is visible\n");
}
if (mSystem->injectMouseButtonDown(Button))
{
printf("***Handled MouseButtonDown***\n");
return true;
}
else
{
return false;
}
It prints:
GUI::MouseButtonDown
GUISheet exists
***Handled MouseButtonDown***
So the GUISheet exists but is not visible, yet it's receiving input.
For now I think I'll try to just setGUISheet(NULL) when nothing is visible.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Who is online
Users browsing this forum: No registered users and 11 guests