Page 1 of 1
how to not handle mouse event?
Posted: Wed Sep 30, 2009 01:41
by valvalval
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.
Re: how to not handle mouse event?
Posted: Wed Sep 30, 2009 04:21
by fedyakin
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).
Re: how to not handle mouse event?
Posted: Wed Sep 30, 2009 05:43
by valvalval
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.
Re: how to not handle mouse event?
Posted: Wed Sep 30, 2009 09:08
by CrazyEddie
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.