If this works, it is definitely a work-around to something else; not knowing what that something else is could cause headaches later. Something does not add up here. I also noticed a few oddities with your code, which pulls into question the whole implementation.
First off you prioritize mTrayMgr over CEGUI in mouseRelease and mouseMove, but you prioritize CEGUI over mTrayMgr in mousePressed. This makes no sense - they should all be consistent. You should treat these as separate layers - either CEGUI or mTrayMgr gets precedence - it should not be mixed.
Second, your isMouseOverUI is awkward. Why have a condition variable if it can only have one value? And why directly query the name of the root window instead of using sys::getGUISheet (a higher level abstraction that encapsulates the root window name)? Aside from those minor issues, this function should be pointless - if your GUISheet has mousePassThrough enabled then injecting mousedown will already return false if the mouse is over the GUISheet (even if it is inactive); unless you have overridden this event and are returning true from the override (see: http://www.cegui.org.uk/mantis/view.php?id=309); or unless you are using a version earlier than 0.7.2? Your code tells me that injecting mouseDown over the GUISheet with mousePassThrough enable still returns true - this is peculiar.
(Solved) Mouse moving/clicking when over CEGUI window
Moderators: CEGUI MVP, CEGUI Team
Re: (Solved) Mouse moving/clicking when over CEGUI window
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!
Re: (Solved) Mouse moving/clicking when over CEGUI window
I agree that the solution is a hack. But until anyone can really explain (coherently and in a way that IS applicable to my architecture as I explained it) how to solve this I have no better solution. I already have tons of 'suggestions' and snippets, none of them working as a whole. I will check on what you said, but its just more try & error with what you have provided...
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: (Solved) Mouse moving/clicking when over CEGUI window
Really my solution should have worked, since that's why that exact set of conditions were put in and 'special cased' (yeah, nasty!). Not sure why it did not work for you.
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 13 guests