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!
mouseEntered/Exited
Moderators: CEGUI MVP, CEGUI Team
Re: mouseEntered/Exited
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.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: mouseEntered/Exited
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?
Perhaps there is something else preventing things from working correctly?
- NSXEagle
- Just popping in
- Posts: 14
- Joined: Wed Jan 12, 2005 12:06
- Location: Kokubunji-shi, Tokyo-to, Japan
- Contact:
Re: mouseEntered/Exited
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.
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