I've tried to subscribe a WindowsLook/Editbox named "Input" to an EventTextAccepted, but I can't get it to work. injectKeyDown ( ) seems to be returning false when i hit enter.
Code: Select all
pConsoleInput->subscribeEvent ( Editbox::EventKeyDown, CWindowEventHandlers::HandleConsoleInput );
Where HandleConsoleInput is:
Code: Select all
bool CWindowEventHandlers::HandleConsoleInput ( const CEGUI::EventArgs &e )
Like I said, it seems that injectKeyDown is just returning false, and HandleConsoleInput is never executed. I've already tried another event (EventTextChanged) and that worked fine. What else am I doing wrong here?
Also, how do you grab a child window? I have a window named console and it has a child named input. I want to get the Console/Input window, but when I try to use WindowManager::getSingleton().getWindow( "Console/Input" ) the library throws an exception and says that the window doesn't exist.
Thanks,
-Derek