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

Disable/enable hovering for UiElements #235

Open
dsallen7 opened this issue Jan 13, 2020 · 0 comments
Open

Disable/enable hovering for UiElements #235

dsallen7 opened this issue Jan 13, 2020 · 0 comments

Comments

@dsallen7
Copy link
Contributor

I've noticed that certain UI elements (RadioButton, Checkbox, Slider) that work fine in a Desktop setting, are erratic or difficult to use on a mobile device or touchscreen. There also seems to be a clear pattern of having to touch Buttons twice before onActionBegin gets triggered. I suspected this has something to do with the Hover node state, specifically that mouseDown events that should have resulted in the nodestate being moved ACTIVE, or mouseUp events that should have returned to NORMAL, instead go to HOVER. I created methods isHoverEnabled/setHoverEnabled in the base UiElement class and made the appropriate changes in the RenderNode classes, and this seems to have cleared the problems right up - the responsiveness is now as good on mobile (Android) as it is on Desktop.

I would like to submit these changes, however if anyone else on the project can shed more light on the topic that would be great, there could be something I'm missing. I have not tested on a variety of mobile devices, and in particular I don't have an iOS device I can test with right now. The change I am proposing would have no effect by default, you would need to setHoverEnabled to false for each element explicitly. I can submit the changes for review.

dsallen7 added a commit to dsallen7/mini2Dx that referenced this issue Jan 21, 2020
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

No branches or pull requests

1 participant