Page 1 of 1

scroll-pane position (rw)

Posted: Fri Mar 01, 2019 9:14 pm
by Godmave
With position in range 0..1 would be nice.

Trying to write a chat mod, and chat history would be better if the last message can be at the bottom and the scroll-pane keeps going there.
If I can read it I could say "if you were at 1 before I will keep you there".

Re: scroll-pane position (rw)

Posted: Fri Mar 01, 2019 10:04 pm
by Therenas
Yes I would love this too!

Re: scroll-pane position (rw)

Posted: Sat Mar 02, 2019 9:59 am
by Boodals
I don't think reading would be possible because I doubt it is synced in multiplayer. However I shall look at adding (I have source access) scroll_to_top(), scroll_to_bottom(), and possibly a scroll_to_element(element) but no promises on the last one. Also it may take a while before it is added (if it's added at all) because the devs are focusing on bug fixes and don't have much time to review my pull requests.
Edit: also scroll_to_left() and scroll_to_right() because I forgot that horizontal scroll bars are a thing.

Re: scroll-pane position (rw)

Posted: Mon Mar 25, 2019 7:14 pm
by Boodals
My implementation of this was just added for 0.17.19.
Includes: scoll_to_left, scroll_to_right, scroll_to_top, scroll_to_bottom, and scroll_to_element, and works for both scroll-panes and text-boxes.

Re: scroll-pane position (rw)

Posted: Mon Mar 25, 2019 7:35 pm
by Godmave
Nice! :)