-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
GetScrollMaxX/Y return incorrect value #1271
Comments
…ta. Using functions in Begin(). (#1271)
You are correct, fixed now. It wasn't extremely obvious because it requires the other scrollbar to notice. I also updated the demo to display more stuff and made the |
Thanks :) |
Ah, thanks! I forgot to mention that I had both scroll-bars turned on. |
Closing. There's another bug (not directly related) right now when Horizontal Scrollbar is enabled and straddle the limit of a disabled Vertical Scrollbar it doesn't automatically enable the Vertical Scrollbar. (PS: I'd be nice if you have screenshots from your game to share in the Gallery threads) |
They both subtract the scrollbar Size, when it should add instead:
return window->SizeContents.x - window->SizeFull.x + window->ScrollbarSizes.x;
If you call SetScrollX(GetScrollMaxX()), then the scrollbar will go almost to the end, but not quite.
If you drag a scrollbar all the way to its extent, you'll get the max value, eg 35. However GetScrollMaxX will return 3 basedon this maths:
window->SizeContents.x - window->SizeFull.x = 19
window->ScrollbarSizes.x = 16
19-16 = 3, but 19+16 = 35.
The text was updated successfully, but these errors were encountered: