(Solved) Mouse moving/clicking when over CEGUI window

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: (Solved) Mouse moving/clicking when over CEGUI window

Postby Jamarr » Thu Sep 23, 2010 20:41

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.
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!

mboeni
Not too shy to talk
Not too shy to talk
Posts: 38
Joined: Wed Sep 08, 2010 16:02

Re: (Solved) Mouse moving/clicking when over CEGUI window

Postby mboeni » Fri Sep 24, 2010 11:33

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...

User avatar
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

Postby CrazyEddie » Mon Sep 27, 2010 12:54

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.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 13 guests