Skip to content
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

fix mouse position not added to EKeyDown and EKeyUp #1147

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ZwodahS
Copy link
Contributor

@ZwodahS ZwodahS commented May 18, 2023

https://github.com/ZwodahS/heaps-interactive-bug

When using LetterBox (and possibly other ScaleMode), Interactive is unable to capture EKeyDown and EKeyUp after the screen is resized.

The bug is due to mouse position to set in Event. On JS, this is properly handled but not in hl.

Repo provided to reproduce the bug.

@Yanrishatum
Copy link
Contributor

To elaborate: Because those are not set, it would be equal to window's 0,0 in scene coordinates. Currently EKeyUp/Down can only be received for non-focused interactives that overlap said top-left corner of the window.
With this fix - KeyUp/Down events are properly assigned current window mouse position and thus are properly sent to whatever Interactive is currently under the mouse. Notably ETextInput does have its mouse position set properly.
This bug is present only on HL side, and not on JS, as here it is properly assigned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants