Page 1 of 1

[17.69] GuiElement Switch

Posted: Mon Sep 30, 2019 6:30 am
by LuziferSenpai
Hey,

when you have the GuiElement Switch, with Captions left/right and then something besides that inside a flow and then resize your Window this happens:
factorio_CMuqEvPMXb.png
factorio_CMuqEvPMXb.png (20.41 KiB) Viewed 2028 times
Same goes with applying a width to the Frame its in:
factorio_CSo0Wd5sik.png
factorio_CSo0Wd5sik.png (27.05 KiB) Viewed 1997 times
Greetz,

Luzifer

Re: [17.69] GuiElement Switch

Posted: Tue Oct 01, 2019 10:16 am
by Klonan
Can you provide a code snippet/console command that will create a GUI showing the issue

Re: [17.69] GuiElement Switch

Posted: Tue Oct 01, 2019 9:40 pm
by LuziferSenpai
For the first Screenshot:

Code: Select all

/c

local frame = game.players[1].gui.screen.add{ type = "frame", name = "TEST01", direction = "vertical", style = "dialog_frame" }
local flow = frame.add{ type = "flow", name = "TEST02", direction = "horizontal" }
local switch = flow.add{ type = "switch", name = "TEST03", switch_state = "right", left_label_caption = "On", right_label_caption = "Off" }
local button = flow.add{ type = "button", name = "TEST04", caption = "I" }

frame.auto_center = true
frame.style.width = 100
Okay, its the same Problem, so when resizing.

Re: [17.69] GuiElement Switch

Posted: Fri Oct 18, 2019 1:16 pm
by Klonan
Well, I guess the widget isn't squashable, so don't try to fit it into too narrow a space

I am going to move this to minor issues, as it is trivial to avoid