Hi All,
I have a problem with the setMousePassThroughEnabled() function when I'm trying to disable all mouse events on a StaticText widget.
It works fine for passing through the mouseover (mouseEnter/mouseLeave) events but when I try to click on the underlying PushButton widget, the event isn't propagated through.
What I have at the moment is a PushButton widget with a Static Text widget overlayed on top and to the right of the button. I setMousePassThroughEnabled(true), on the StaticText widget and that allows the mouseHover event to work fine, however when I try to click in the area covered by the StaticText widget but also over the button, nothing happens, my EventClicked callback isn't triggered
I've tried also setting a callback on the StaticText widget for a mouseButtonUp event with no success, is this a bug?
Any solutions greatfully received.
Thanks.
Window event problem
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
I'm not sufficiently familiar with events to trace the functions called but I have found the following. CEGUIWindow.h/cpp contain the fonction getTargetChildAtPosition() which makes use of isMousePassThroughEnabled(). However this code only works for a hierarchy of children. If your StaticText a child of Pushbutton or is it simply "on top" of it? It's an idea, although I find it strange that it would work while hovering but not when clicking.
A workaround would be for the StaticText to subscribe to a mouse click event which would simply feed it back to the pushbutton's click event.
A workaround would be for the StaticText to subscribe to a mouse click event which would simply feed it back to the pushbutton's click event.
-
- Quite a regular
- Posts: 79
- Joined: Wed Jan 09, 2008 11:06
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Hi,
Turns out this was actually a bug, see http://www.cegui.org.uk/mantis/view.php?id=154 for someone else reporting the same issue.
As mentioned on Mantis, this is fixed in svn trunk r1531.
CE.
Turns out this was actually a bug, see http://www.cegui.org.uk/mantis/view.php?id=154 for someone else reporting the same issue.
As mentioned on Mantis, this is fixed in svn trunk r1531.
CE.
-
- Quite a regular
- Posts: 79
- Joined: Wed Jan 09, 2008 11:06
Who is online
Users browsing this forum: No registered users and 16 guests