how to not handle mouse event?

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

valvalval
Not too shy to talk
Not too shy to talk
Posts: 27
Joined: Wed May 06, 2009 08:16

how to not handle mouse event?

Postby valvalval » Wed Sep 30, 2009 01:41

i need to make mouse events not handled by CEGUI.

for example,

Code: Select all

bool SpecialEvent(const EventArgs& arg)
{
return false;
}

this code works for not handling event.
injectButtonDown always return "true"
i have to get "false" from injectmethod series.

sure, it is version 0.7

combobox too.
Last edited by valvalval on Wed Sep 30, 2009 06:18, edited 1 time in total.

fedyakin
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Thu Apr 17, 2008 06:13
Location: Arizona, United States of America

Re: how to not handle mouse event?

Postby fedyakin » Wed Sep 30, 2009 04:21

The newest version of cegui (0.7.0) modified how events are marked as handled. The changes are described in the "Events and input handling changes" section of http://www.cegui.org.uk/docs/current/porting6to7.html.

If you want mouse input that is not over a ui element to be marked as not handled, then use a DefaultWindow as your root window, and set the mouse pass through enabled property to true. If you are trying to accomplish something else, then I misunderstood your question.

Note: A click that activates the root window is considered handled (http://www.cegui.org.uk/mantis/view.php?id=309).

valvalval
Not too shy to talk
Not too shy to talk
Posts: 27
Joined: Wed May 06, 2009 08:16

Re: how to not handle mouse event?

Postby valvalval » Wed Sep 30, 2009 05:43

ya~ i don't want to set mouseinputpass.

In previous version, returing "False"(event function) means that InputEvent isn't handled by CEGUISystem.

so i can pass that event(eg, mouse button down) into, my application

input flow chart is like this,

CEGUIsystem -> handled? -> no -> pass into MyApplication.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: how to not handle mouse event?

Postby CrazyEddie » Wed Sep 30, 2009 09:08

In the previous version (0.6.x) this behaviour was extremely buggy to the point of being useless.

In the new versions (0.7.x), what was described by fedyakin is the method to achieve what you're trying to do (leaving aside that small bug). So it should not be a case of you not wanting to set that property on the root, because the fact is that using a DefaultWindow with that property set is the only reliable way to get the desired result (note that this new behaviour is not a hack or workaround, it was purposefully implemented this way within the lib).

HTH

CE.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 14 guests