Maximum height for scroll panes seems off?

Place to get help with not working mods / modding interface.
User avatar
Killkrog
Long Handed Inserter
Long Handed Inserter
Posts: 75
Joined: Thu Jun 09, 2016 1:04 pm
Contact:

Maximum height for scroll panes seems off?

Post by Killkrog »

So I create a scroll pane.
To that scroll pane, I add a flow with zero padding.
The flow has a cell spacing of 2 pixels.
Now I add 11 elements to the flow, each has the same height of 51 pixels.

I only want to have 5 elements shown at a time, so I set the maximum height for the scroll pane to 51 * 5 + 2 * (5 - 1) = 263

In game, it shows 5.5 items though.

I make a screenshot and meassure the distance in photoshop. 263 pixel is the exact height of the first 5 elements.

Only when i manually substract 25 pixles from the calculated 263 ones, it seems correct.

Whats happening here, can anybody explain? :C
Post Reply

Return to “Modding help”