mouseEntered/Exited

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
paulr1984
Just popping in
Just popping in
Posts: 1
Joined: Fri Feb 11, 2005 18:56

mouseEntered/Exited

Postby paulr1984 » Fri Feb 11, 2005 19:04

I have a FrameWindow in my ogre application and I want to detect when the mouse enters/exits the FrameWindow. I tried mouseEntered/Exited but cannot detect when the mouse enters/exits the framewindow. Is it suupposed to do that? Or does it only detect when the mouse enters/leaves the entire ogre application?

I need this because I have to know if the user is clicking on the gui or on the 3d landscape. If its clicking on the gui, I should not move the camera. But if its clicking on the landscape, then I should move the camera towards that point.

Basically, the application I'm making is like your normal rpg. When the player is clicking on the inventory gui, you don't move the player's character towards that point.

Take it easy on me. I'm quite new to cegui. Thanks!

User avatar
pjcast
Quite a regular
Quite a regular
Posts: 47
Joined: Wed Jan 12, 2005 12:06

Re: mouseEntered/Exited

Postby pjcast » Fri Feb 11, 2005 23:03

I subscribe the event CEGUI::Window::EventMouseEnters for my buttons, and it calls my callback when the event happens, and I'm sure the Exits would also work.

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

Re: mouseEntered/Exited

Postby CrazyEddie » Sat Feb 12, 2005 09:46

I can also say that I have previously tested these events and there should be no problems.

Perhaps there is something else preventing things from working correctly?

User avatar
NSXEagle
Just popping in
Just popping in
Posts: 14
Joined: Wed Jan 12, 2005 12:06
Location: Kokubunji-shi, Tokyo-to, Japan
Contact:

Re: mouseEntered/Exited

Postby NSXEagle » Sat Feb 12, 2005 11:10

My problem was quite the same: When the user doesn't click on a GUI element, then do 3D picking (and select an object if there's one), otherwise do no picking.

Here is my approach:
I subscribed a mouseButtonUp (mouseClicked should do it, too) event for the root window of the GUI. When the user clicks and doesn't hit a GUI element, the hits the root window, so 3D picking is executed. If he clicks on a GUI element, he doesn't click on the root window, so nothing happens.

Hope I could help you.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 8 guests