LuaGuiElement scroll-pane: extra_(direction)_padding_when_activated

Post Reply
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 449
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

LuaGuiElement scroll-pane: extra_(direction)_padding_when_activated

Post by raiguard »

Hello. With scroll panes, you have the ability to define extra padding and extra margin when the scroll is active. With margin, you can specify an extra margin for each side specifically (top, left, bottom, right). However, with padding, you can only define it for all four sides at once. I would like to request that we be able to add extra padding to specific sides when active, like you can do with margin.

Thanks!
Don't forget, you're here forever.

User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 449
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: LuaGuiElement scroll-pane: extra_(direction)_padding_when_activated

Post by raiguard »

(reposted since I actually didn't find another way...)

Bump. I am having to re-implement listboxes with a scrollpane and buttons due to limitations of that gui element. As you can see in this GIF, I have mostly managed to get the styles right, but there is a small problem:

Image

I have tried many workarounds, but ultimately have come to the conclusion that the only way to get the behavior I want is to add side-specific extra padding when activated. That way I can just set the right padding to -12 when the scrollbar is active, and allow the buttons to stretch all the way across when it's not.
Don't forget, you're here forever.

Bilka
Factorio Staff
Factorio Staff
Posts: 3123
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: LuaGuiElement scroll-pane: extra_(direction)_padding_when_activated

Post by Bilka »

This was added at some point.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Post Reply

Return to “Implemented mod requests”