CEGUI in Ogre problem

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
guanhongyao
Just popping in
Just popping in
Posts: 1
Joined: Wed Jan 18, 2006 12:18

CEGUI in Ogre problem

Postby guanhongyao » Wed Jan 18, 2006 12:24

hi, I am trying to pick objects or place objects in my scene, and that works fine, problem is, I have cegui setup with a few windows in the corners of my screen with some buttons, now when i hit those buttons, it still picks objects if they are behind the buttons. and still the buttons can't work.

I need it to determine if the mouse is over a window, and to disable picking at that point.

Will anybody tell me how to do that.Thanks for advance!

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

Re: CEGUI in Ogre problem

Postby CrazyEddie » Sat Feb 04, 2006 20:49

The System::getWindowContainingMouse method might be of use here, though when not over a button, it may likely return your root 'sheet' and not NULL, so just check for that condition too.

Another alternative is to check the return from the mouse event injectors to see if the event was handled by CEGUI - if so you do not pass on to your picking code, and if the event was not handled, you would :)

HTH

CE


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 4 guests