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

GUI: Increase position range for a slider value #5317

Merged
merged 1 commit into from Sep 11, 2023

Conversation

antoniou79
Copy link
Contributor

@antoniou79 antoniou79 commented Sep 8, 2023

This makes it so that half the space before and after a slider value is assigned to that value

Currently for sliders with small value range, the whole space between two consecutive values on the slider is "assigned" to the lower value. Hence, the only ways to set the slider to the highest value is to either use the mouse wheel scroll, or click and drag, or click at a pixel of the far edge of the slider, which is hard to do especially with direct touch interface.

This PR addresses the final option, making it a bit easier to get the final value when using simple clicks or direct touch. It still uses integer division to get the slider value from the click position, but "divides" the space between two values in half, assigning the first half to the left (smaller) value and the right half to the right (higher).

This was inspired mainly for touchsreen interfaces where simple tap is the main form of interaction (and mouse wheel or click and drag may not be supported or more difficult to pull through).

For a quick test, test with the slider in launcher's grid view for "icons per row" (which goes from 1 to 12).
On a mobile phone, you can also test in Global Options -> Control with the "Pointer Speed" slider (this was also reported in a tweet today), or the "Joy Deadzone" one.

For reference here's the tweet mentioning the issue: https://twitter.com/therealjbenam/status/1700121630972715165

This makes it so that half the space before and after a slider value is assigned to that value

Currently for sliders with small value range, the only ways to set them to the highest value is
to either use the mouse wheel scroll, or click and drag, or click at a pixel of the far edge of the slider.
This PR addresses the final option, making it a bit easier to get the final value when using simple clicks.
It still uses integer division to get the slider value from the click position, but "divides" the space between
two values in half, assigning the first half to the left (smaller) value and the right half to the right (higher).

This was inspired mainly for touchsreen interfaces where simple tap is the main form of interaction
(and mouse wheel or click and drag may not be supported or more difficult to pull through).
@sev-
Copy link
Member

sev- commented Sep 11, 2023

Thanks!

@sev- sev- merged commit 86d1853 into scummvm:master Sep 11, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants