Open J-Fields opened 2 years ago
Are you sure the scroll bars are broken, rather than inappropriately applied (the first being a problem with the scrollbar functionality itself, while the latter is a problem local to individual usages, such as the crafting menu)?
If I remember correctly, I had that issue with one menu where the scroll bar checks were against the size of the window, rather than the size of the area allocated to entries (i.e. the "hidden items" in you case could be the header part). In my case the logic also checked against the number of items in the list to be displayed, rather than the number of lines required (some entries required multiple lines), compounding the issue.
Based on my reading of the code yesterday, I'm pretty sure the implementation is simply wrong, but later today I'll take another look and put a PR up which we can discuss.
If I remember correctly, I had that issue with one menu where the scroll bar checks were against the size of the window, rather than the size of the area allocated to entries
Finally got back to this and looks like you're right (or something very similar, at least). draw_scrollbar
expects to be given how fat it should be scrolled, but some usages give the currently selected index.
Describe the bug
Scroll bars are just broken - they don't correctly convey the information they're supposed to.
Steps to reproduce
Easiest way to repro is to spawn in, go to
crafting > food
and hitj
. At least with my screen dimensions, the scrollbar moves but the list doesn't scroll. Thus it looks like there are items hidden above the first listed item, but there aren't.Expected behavior
A scrollbar should:
Screenshots
Versions and configuration
Latest experimental, but this isn't a new bug
Additional context
I've got a branch fixing this that just needs a bit of polish & testing, so feel free to assign me