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

feat(nui-libgdx): replace touch pointer removal logic with configurable stickiness #67

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

Conversation

BenjaminAmos
Copy link
Contributor

This is a fix that makes the UI on Android when using nui-libgdx a bit more responsive. I found that with my previous implementation of the touch removal logic some button release events were not being processed. This was due to the pointer being removed before the button had registered the mouse release event, so the pointer was no longer being registered as hovering over the button.

The new logic makes the system more configurable by employing a "stickiness" value, which is the number of updates to retain the touch pointer for at it's former position after the touch has been released. A lower stickiness makes the UI more responsive but risks missing input events. A higher stickiness means that the UI will register mouse hover events for longer after the touch has been released.

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.

None yet

1 participant