[Rseding91][0.16.20][Modding] guiElement scroll-pane

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
lovely_santa
Filter Inserter
Filter Inserter
Posts: 502
Joined: Sat Feb 18, 2017 9:41 pm
Contact:

[Rseding91][0.16.20][Modding] guiElement scroll-pane

Post by lovely_santa »

Hi,

I know a gui rework is planned for 0.17... But I think the behaviour of the scroll bar doesn't work correctly...

I've set my scroll bar to only scroll in horizontal direction when needed:

Code: Select all

    local configTableSlider = configTable.add{
      type = "scroll-pane",
      name = self.guiElementNames.configTableSlider,
      horizontal_scroll_policy = "auto", -- default
      vertical_scroll_policy = "never"}
Resulting in this:
Image
Image

As you can see in the upper image it added the horizontal scroll bar when there are too many items to fit... BUT it also added a vertical one, none the less there isn't a limitation on the frames hight... AND I didn't add anything else in the vertical direction between the two pictures

So then i changed the horizontal policy to "always".. That way i'm sure there is enough vertical space to fit it, resulting in this:
Image
Image

So even when the horizontal scroll bar was already in place, it still added the vertical one... And if I scroll down on the vertical one there was nothing below... I would expect setting the vertical one to "never" would prevent it from showing, at least when the horizontal one is already present, becose at that point the height don't change at all in this case..

greetings
lovely_santa

PS: since the forum didn't let me upload any pictures for some reason (see 57310), i couldn't include a save file / code and pictures are uploaded on imgur
Image
Last edited by lovely_santa on Tue Jan 30, 2018 12:09 pm, edited 4 times in total.
You can find all my mods on the mod portal. Also helping on Arch666Angel's mods.
Image

User avatar
lovely_santa
Filter Inserter
Filter Inserter
Posts: 502
Joined: Sat Feb 18, 2017 9:41 pm
Contact:

Re: [Rseding91][0.16.20][Modding] guiElement scroll-pane

Post by lovely_santa »

Uploaded saves on wetransfer:

Mod used: https://we.tl/ERZnjKgJqk
Save file: https://we.tl/QMactARcoB

Steps:
  • In the save game is an emitter places click on it to open the UI and click the gears to open the gui from the screenshot.
  • In the mod file /src/gui.lua line 253 is a setting fieldWidth = 65 to add more buttons so the scroll bar should appear
  • When commenting that line it will only show 25 and it should fit.
  • On line 280 (same file) is the scroll-plane to set the horizontal/vertical scroll policy.
Greetings
lovely_santa
You can find all my mods on the mod portal. Also helping on Arch666Angel's mods.
Image

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91][0.16.20][Modding] guiElement scroll-pane

Post by Rseding91 »

Thanks for the report. The scroll pane was bugged and would ignore vertical scroll policy in most cases. I've fixed it for the next version of 0.16.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”