The next version should have an event-specific boolean pass through for all event types, ex:
setMousePassThroughEnabled (bool setting, unsigned integer eventTypeId).
Event specific pass-through.
Moderators: CEGUI MVP, CEGUI Team
Re: Event specific pass-through.
Here is an example of why this is important.
My game uses the middle mouse button (scroll wheel) to zoom in and out. I want to make an event-function for the entire area of a window that will deactivate the global scroll wheel trigger. (thus turning off the zoom in/out) This is useful for windows that have potentially some scrollable content: I don't want to both scroll and zoom in/out at the same time!
Unfortunately I seemingly cannot do this.
I have to set the scroll wheel event-function for every single sub-window in my window. This gets extremely tedious.
My game uses the middle mouse button (scroll wheel) to zoom in and out. I want to make an event-function for the entire area of a window that will deactivate the global scroll wheel trigger. (thus turning off the zoom in/out) This is useful for windows that have potentially some scrollable content: I don't want to both scroll and zoom in/out at the same time!
Unfortunately I seemingly cannot do this.
I have to set the scroll wheel event-function for every single sub-window in my window. This gets extremely tedious.
Re: Event specific pass-through.
Why don't you just subscribe to the global scroll event, use CEGUI::System::getWindowContainingMouse and then Window::isPropertyPresent to check for ScrollPosition, or some other relevant property, or even a custom property, to determine if the scroll should be local or global; or instead of properties, you could check for a specific type of window, or name, etc. there are many possibilities.
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: Event specific pass-through.
It appears that CEGUI::System::getWindowContainingMouse is similarly limited... As far as I can tell, I can't check for a specific window; I have to specify both it and all its children to check for the mouse being in that window's area...
At the moment I just turn off map scrolling whenever the mouse is in *any* window except root, but that's not really the ideal.
At the moment I just turn off map scrolling whenever the mouse is in *any* window except root, but that's not really the ideal.
Re: Event specific pass-through.
Hmm...
Another thing that would be useful is an EventElsewhere() :
Normally, you would do something like 'cegui.subscribeEvent (window, "MouseClick", ...'
I have come upon the need to add an event that's the opposite: ie, it would fire when there's a mouseclick SOMEWHERE ELSE...
Another thing that would be useful is an EventElsewhere() :
Normally, you would do something like 'cegui.subscribeEvent (window, "MouseClick", ...'
I have come upon the need to add an event that's the opposite: ie, it would fire when there's a mouseclick SOMEWHERE ELSE...
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Event specific pass-through.
If you're on svn / snapshot code, you might also look at the recently added mouse event propagation setting for window: Window::setMouseInputPropagationEnabled, which passes unhandled mouse inputs back up the window hierarchy.
CE
CE
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: Event specific pass-through.
The same fundamental problem of having to use setMouseInputPropagationEnabled on every child window remains.
It would be more useful to be able to set it the other way around, either with:
*one new command that would tell the window's current and future children to use setMouseInputPropagationEnabled
*or*
distributesCapturedInputs () with a parameter for which input to distribute.
*or*
setMousePassThroughEnabled (bool setting, unsigned integer eventTypeId)
It would be more useful to be able to set it the other way around, either with:
*one new command that would tell the window's current and future children to use setMouseInputPropagationEnabled
*or*
distributesCapturedInputs () with a parameter for which input to distribute.
*or*
setMousePassThroughEnabled (bool setting, unsigned integer eventTypeId)

Return to “Bug Reports, Suggestions, Feature Requests”
Who is online
Users browsing this forum: No registered users and 7 guests