Using Irrlicht and bootstrap...
Ok, I've searched all over and I can't get neither "CEGUI::System::getSingleton().injectMouseMove(x, y)" nor "CEGUI::MouseCursor::getSingleton().setPosition(CEGUI::Vector2(x, y))" to work properly.
When I use "CEGUI::MouseCursor::getSingleton().setPosition(CEGUI::Vector2(x, y))", nothing happens.
When I use "CEGUI::System::getSingleton().injectMouseMove(x, y)", the mouse does move (sometimes--on the 2nd frame... it's hard to explain everything), but it goes back to previous position the next time CEGUI gets a mouse event from Irrlicht.
Edit: Hold the phone... looks like I can get the Irrlicht mouse position, start the gui, then re-set with the old Irrlicht mouse position. This seems to work but also seems dirty.
Is there any simple way, though, to make CEGUI not reset my mouse coordinates to the center?
How to make CEGUI NOT reset mouse position?
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: How to make CEGUI NOT reset mouse position?
CEGUI does not reset the mouse position; it uses whichever positions come in via the injection interface. If you want to use the injection interface directly, then it's probably not a good idea to be calling the Irrlicht event pusher as well.
One other thing to check is that the mouse constraint area is correct - either by setting the display size with System::notifyDisplaySizeChanged or by setting it directly with MouseCursor::setConstraintArea
CE.
One other thing to check is that the mouse constraint area is correct - either by setting the display size with System::notifyDisplaySizeChanged or by setting it directly with MouseCursor::setConstraintArea
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: How to make CEGUI NOT reset mouse position?
>CEGUI does not reset the mouse position; it uses whichever positions come in via the injection interface. If you want to use the injection interface directly, then it's probably not a good idea to be calling the Irrlicht event pusher as well.
Before I send any events to CEGUI, it resets the mouse position to the center of the screen on the bootstrap call.
>"One other thing to check is that the mouse constraint area is correct - either by setting the display size with System::notifyDisplaySizeChanged or by setting it directly with MouseCursor::setConstraintArea"
It seems correct..
Before I send any events to CEGUI, it resets the mouse position to the center of the screen on the bootstrap call.
>"One other thing to check is that the mouse constraint area is correct - either by setting the display size with System::notifyDisplaySizeChanged or by setting it directly with MouseCursor::setConstraintArea"
It seems correct..
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: How to make CEGUI NOT reset mouse position?
Yes. it sets it's own mouse position to the centre of the host window, one time only. It does not reset this at any other point in time.
CE.
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: How to make CEGUI NOT reset mouse position?
Well, I would like to make it so that it does not reset the position. Maybe you could add it as an option, please?
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: How to make CEGUI NOT reset mouse position?
I will add a feature request ticket. Since we can't leave the position of the CEGUI mouse cursor uninitialised, what I propose is to add a static function to the CEGUI::MouseCursor class that allows client code to pre-initialise the CEGUI mouse position to whatever value they like. Upon instantiation, if the position is already initialised CEGUI will not touch it, otherwise the existing behaviour will prevail.
CE.
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Who is online
Users browsing this forum: No registered users and 25 guests