Hi,
I'm using the return value of System::injectMousePosition to determine, if the cursor is currently in the gui. But there's a problem with that.
When the cursor is e.g. on the title bar, the method returns false. In this case, I can't move the windows, because of the conditional logic in my game. I test, if the mouse in the gui and send button clicks to the CEGUI, otherwise I let the game handle it. Same, when an e.g. empty static image is on a window.
Am I doing something wrong? I'm using the layout editor to create the layouts.
Greetings
Problem with mouse in GUI
Moderators: CEGUI MVP, CEGUI Team
- scriptkid
- Home away from home
- Posts: 1178
- Joined: Wed Jan 12, 2005 12:06
- Location: The Hague, The Netherlands
- Contact:
You might change your logic by calling this method from your mouse move handler, so that you don't always "inject".
This is a method of Window, which you can call on your root window, since it works recursively.
HTH.
Code: Select all
Window* getTargetChildAtPosition (const Vector2 &position) const
This is a method of Window, which you can call on your root window, since it works recursively.
HTH.
Who is online
Users browsing this forum: No registered users and 28 guests