Page 1 of 1

problem with EventInputCaptureGained/Lost

Posted: Tue Aug 18, 2009 12:17
by PJani
Hey, i have one problem with EventInputCaptureGained/Lost on root window. I need to know when im interacting with "3D world" and when im interacting with cegui...
So i subscribed 2 events. But when i want to test this thing nothing happends no logmessages...

Any idea or another posible way?

Code: Select all

    m_WinRoot->subscribeEvent(CEGUI::Window::EventInputCaptureGained,CEGUI::Event::Subscriber(&GUIManager::onRootWindowInputGained, this));
    m_WinRoot->subscribeEvent(CEGUI::Window::EventInputCaptureLost ,CEGUI::Event::Subscriber(&GUIManager::onRootWindowInputLost, this));

Code: Select all

    bool GUIManager::onRootWindowInputGained(const CEGUI::EventArgs &e){
        Ogre::LogManager::getSingletonPtr()->logMessage("Test::RootWindow::>InputGained");
        m_InputGained = true;
        return true;
    }
    bool GUIManager::onRootWindowInputLost(const CEGUI::EventArgs &e){
        Ogre::LogManager::getSingletonPtr()->logMessage("Test::RootWindow::>InputLost");
       m_InputGained = false;
        return true;
    }


Re: problem with EventInputCaptureGained/Lost

Posted: Tue Aug 18, 2009 13:19
by CrazyEddie
These events do not mean what you appear to think they mean; they relate to input capture, which is something that happens - generally - while you are interacting with some UI element (for example, while you hold down a CEGUI PushButton, mouse input is captured to that widget so that it can correctly maintain it's state).

For the issue of determining whether an event occurred over a UI element, the idea is that you check the return value from the System::inject* functions, however in the 0.6.x code that is buggy, so you have to resort to hacks - there are a few to choose from:
viewtopic.php?f=10&t=4213
viewtopic.php?f=10&t=4169
viewtopic.php?p=6989#p6989

CE.

Re: problem with EventInputCaptureGained/Lost

Posted: Tue Sep 22, 2009 20:08
by PJani
Is this problem solved when is root windows active in 0.7.0?

Is tab char solved in Edit boxes?

Re: problem with EventInputCaptureGained/Lost

Posted: Wed Sep 23, 2009 08:45
by CrazyEddie
PJani wrote:Is this problem solved when is root windows active in 0.7.0?

In 0.7.0 your root window should be a DefaultWindow with the MousePassThroughEnabled property set to true, the return values from the injectors should then be correct.

PJani wrote:Is tab char solved in Edit boxes?

Huh? Mind reading is not one of my major skills. You will need to elaborate on what you're referring to.

CE.

Re: problem with EventInputCaptureGained/Lost

Posted: Wed Sep 23, 2009 18:54
by PJani
Hmm.
Is tab character "\t"(ASCII char 0x09) rendered corectly now in 0.7.0?

And how can i disable control tags?

Re: problem with EventInputCaptureGained/Lost

Posted: Thu Sep 24, 2009 08:35
by CrazyEddie
Is tab character "\t"(ASCII char 0x09) rendered corectly now in 0.7.0?

Oh, right. This is in the MultiLineEditbox you mean and not the Editbox? In either case, no this is not yet supported.

And how can i disable control tags?

These are not used in the editbox classes currently, for other window types you can set a custom string parser with Window::setCustomRenderedStringParser and use an instance of CEGUI::DefaultRenderedStringParser. Eventually this will be much more easily achieved and will become part of a window type's falagard specification in scheme files.

CE.

Re: problem with EventInputCaptureGained/Lost

Posted: Fri Oct 30, 2009 18:54
by PJani
If i disable control tags with ->setTextParsingEnabled(false); the newline character is not processed...idea?