scroll-pane position (rw)

Post Reply
User avatar
Godmave
Long Handed Inserter
Long Handed Inserter
Posts: 89
Joined: Tue Nov 15, 2016 3:52 pm
Contact:

scroll-pane position (rw)

Post 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".

User avatar
Therenas
Factorio Staff
Factorio Staff
Posts: 232
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

Re: scroll-pane position (rw)

Post by Therenas »

Yes I would love this too!

Boodals
Fast Inserter
Fast Inserter
Posts: 129
Joined: Sun Feb 11, 2018 7:10 pm
Contact:

Re: scroll-pane position (rw)

Post 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.

Boodals
Fast Inserter
Fast Inserter
Posts: 129
Joined: Sun Feb 11, 2018 7:10 pm
Contact:

Re: scroll-pane position (rw)

Post 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.

User avatar
Godmave
Long Handed Inserter
Long Handed Inserter
Posts: 89
Joined: Tue Nov 15, 2016 3:52 pm
Contact:

Re: scroll-pane position (rw)

Post by Godmave »

Nice! :)

Post Reply

Return to “Implemented mod requests”