The ability to create a scroll-pane and set the initially visible portion of the pane to something other than the top.
Whaat?
When a scroll-pane is newly created the scroll pane will always show the upper left corner. I would like to be able to control which part of the scroll-pane is displayed by default without inhibiting the users ability to scroll up/down later.
Why?
When a user closes and reopens a scroll-panel (i.e. the panel is recreated) it is desireable for a mod to display the same section of the panel that was displayed when the panel was closed. This would also make it possible to have behavior like the # operator on web pages that allows a user to quickly jump to a subsection of e.g. a wikipedia article without having to create a seperate page for every subsection.
How?
Two [r/w] float values vertical_scroll_state and horizontal_scroll_state would suffice. These would give a percentage value of how far down the panel should be scrolled down. Additionaly an event on_scroll_state_changed would also be nice to ensure a mod always knows the last scroll state (as in certain circumstances there might be no event called before a gui element is destroyed, leaving no time to read the last state).
Usecases
- Jumping directly to a part of the scroll-pane.
- Adding hotkey navigation to a scroll-pane.