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

Trackbar jumps to wrong position when clicked. #484

Closed
dlamkins opened this issue Sep 30, 2021 · 3 comments
Closed

Trackbar jumps to wrong position when clicked. #484

dlamkins opened this issue Sep 30, 2021 · 3 comments
Labels
bug Something isn't working or doesn't work as expected. UI

Comments

@dlamkins
Copy link
Member

https://i.gyazo.com/c185f613865f1ca38e36b02cbefc7044.gif
https://i.gyazo.com/bfde64ab95e0c0f4844d533fc246cba7.gif

The trackbar jumps when clicked on. Appears to be made worse when the starting offset is non-zero. Replicate with the setting:
image

REF: https://discord.com/channels/531175899588984842/599270434642460753/892811075966349353

@dlamkins dlamkins added bug Something isn't working or doesn't work as expected. UI labels Sep 30, 2021
@entrhopi
Copy link
Member

I tried to mitigate this by subtracting 29 from _dragOffset in https://github.com/blish-hud/Blish-HUD/blob/dev/Blish%20HUD/Controls/TrackBar.cs#L96 like so:
var relMousePos = this.RelativeMousePosition - new Point(_dragOffset - 29, 0);

This seems to lessen the effect but the closer you get to the left or right of the bar there will be a tiny drift to either side.

I will investigate this further.

@entrhopi
Copy link
Member

Found part of the issue:
If a MinValue other than 0 is specified, then this would be the wrong slider offset as seen in the examples above.

Working on a fix now.

dlamkins added a commit that referenced this issue Dec 21, 2021
Fixed TrackBar value generation/tracking #484
@dlamkins
Copy link
Member Author

Closed by #556!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working or doesn't work as expected. UI
Projects
None yet
Development

No branches or pull requests

2 participants