Page 1 of 1

CEGUI intercepting left click on no widget

Posted: Fri Apr 21, 2006 22:23
by jones
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.