CEGUI is intercepting all mouse clicks

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

User avatar
rogerdv
Quite a regular
Quite a regular
Posts: 62
Joined: Thu Mar 31, 2005 23:21
Contact:

CEGUI is intercepting all mouse clicks

Postby rogerdv » Mon Jun 27, 2011 12:23

Im having a problem with cegu on my project, seems that it is processing all mouse clicks. This is my mouse pressed event:

Code: Select all

bool StratApp::mousePressed (const OIS::MouseEvent &arg, OIS::MouseButtonID id)
{

   if (CEGUI::System::getSingleton().injectMouseButtonDown(convertOGREButtonToCEGUI(id)))
            return true;
  * * *
}

This is my layout file:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>

<GUILayout >
    <Window Type="DefaultWindow" Name="Root" >
        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
        <Window Type="OgreTray/Button" Name="Root/btNew" >
            <Property Name="Font" Value="DejaVuSans-10" />
            <Property Name="Text" Value="New" />
            <Property Name="UnifiedAreaRect" Value="{{0.00898439,0},{0.0102427,0},{0.0617188,0},{0.0486516,0}}" />
        </Window>
        <Window Type="OgreTray/Button" Name="Root/btLoad" >
            <Property Name="Font" Value="DejaVuSans-10" />
            <Property Name="Text" Value="Load" />
            <Property Name="UnifiedAreaRect" Value="{{0.0707031,0},{0.0103775,0},{0.123438,0},{0.0487865,0}}" />
        </Window>       
    </Window>
</GUILayout>


I copied the code from a previous project, where it works perfectly. But here it always returns without letting the rest of the code to be executed. Any idea?

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: CEGUI is intercepting all mouse clicks

Postby Kulik » Mon Jun 27, 2011 16:29

Enable the mouse pass through for the root window. The root window takes the whole screen and "eats" all the click events. If it has mouse event pass through enabled, it won't consume the events.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 2 guests