CEGUI intercepting left click on no widget

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

Just popping in
Just popping in
Posts: 1
Joined: Fri Apr 21, 2006 21:46
Location: Helsinki, Finland

CEGUI intercepting left click on no widget

Postby jones » Fri Apr 21, 2006 22:23

I call the following method in case of a mouse click (that I get thru SDL):

Code: Select all

void InputFrameListener::mousePressed( SDL_MouseButtonEvent * e ) {
   if( ! CEGUI::System::getSingleton( ).injectMouseButtonDown(
      convertButtonCode( e->button ) ) )
      cameraActive = true;
      CEGUI::MouseCursor::getSingleton( ).hide( );

The code inside the "if" is only executed in case of a right click, even tho I'm not clicking on any widget. There's only one widget in my scene, and I'm not clicking on it.

My point is that I'd like to perform that code in both cases: left click and right click, unless of course I'm clicking on a widget.

What's wrong?

Thank you.

Return to “Help”

Who is online

Users browsing this forum: No registered users and 12 guests