-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing mouse click event when closing a popup. #98
Comments
Note: I'm not ignoring this report but every time I read it, I'm not sure what to do about yet and then life gets in the way again. Curious if it would also happen if the mouse click was handled with Lemur's InputMapper instead of JME's cludgy InputManager. I assume it would, though. |
When describing "PopupState.ClickMode=Close" it says that "A click outside of the current popup will close the current popup and the event will otherwise propagate to whatever was below.". But when I click a button (or another GUI element) that is behind the popup, the popup is closed. The event (MouseButtonEvent = pressed) is not caught by the button, but passed on directly to the JME's InputManager. Since a click consists of two events, the second event (MouseButtonEvent = release) is intercepted by the button. I expected that both events would be handled by the button in this case. |
There is some weirdness with event delivery in the case of the popup blockers. It's frustrating because I really do want that first 'down' event to be passed on but it would require a sensitive refactoring of the mouse propagation code. So to me your issue is kind of a real one but it's just difficult to accomplish a fix. I'm going to leave it open. |
I create and show a popup with the property ClickMode=Close.
A click outside of the popup on another Lemur-GUI-Element will close the current popup and a MouseButtonEvent=pressed pass through to the real UI (to the JME analog listener) not to the Lemur-GUI-Element.
But the MouseButtonEvent=release will be catched by Lemur-GUI-Element and will be not pass through to the JME.
Thats why the MouseButtonEvent=pressed will be triggered by each update loop.
Example:
Click on "Open Popup" button two times. The message "MouseInput.BUTTON_LEFT" will be continuously logged on the console until you click somewhere.
The text was updated successfully, but these errors were encountered: