problem with EventInputCaptureGained/Lost

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

PJani
Just popping in
Just popping in
Posts: 17
Joined: Tue Jul 14, 2009 10:10

problem with EventInputCaptureGained/Lost

Postby PJani » Tue Aug 18, 2009 12:17

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;
    }


User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: problem with EventInputCaptureGained/Lost

Postby CrazyEddie » Tue Aug 18, 2009 13:19

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.

PJani
Just popping in
Just popping in
Posts: 17
Joined: Tue Jul 14, 2009 10:10

Re: problem with EventInputCaptureGained/Lost

Postby PJani » Tue Sep 22, 2009 20:08

Is this problem solved when is root windows active in 0.7.0?

Is tab char solved in Edit boxes?

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: problem with EventInputCaptureGained/Lost

Postby CrazyEddie » Wed Sep 23, 2009 08:45

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.

PJani
Just popping in
Just popping in
Posts: 17
Joined: Tue Jul 14, 2009 10:10

Re: problem with EventInputCaptureGained/Lost

Postby PJani » Wed Sep 23, 2009 18:54

Hmm.
Is tab character "\t"(ASCII char 0x09) rendered corectly now in 0.7.0?

And how can i disable control tags?

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: problem with EventInputCaptureGained/Lost

Postby CrazyEddie » Thu Sep 24, 2009 08:35

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.

PJani
Just popping in
Just popping in
Posts: 17
Joined: Tue Jul 14, 2009 10:10

Re: problem with EventInputCaptureGained/Lost

Postby PJani » Fri Oct 30, 2009 18:54

If i disable control tags with ->setTextParsingEnabled(false); the newline character is not processed...idea?


Return to “Help”

Who is online

Users browsing this forum: No registered users and 7 guests