[0.17.79] API documentation wrong on guielement.resize_to_sprite?
Posted: Mon Feb 03, 2020 10:42 am
I added a button to a flow with:
Which does make it show up with a green check mark. But it's slightly out of the flow I want it to be in, going outside the frame.
I tried:
And got this response:
https://lua-api.factorio.com/latest/LuaGuiElement.html
Code: Select all
flow_buttons.add{type = "sprite-button", name = "button_apply", sprite = "virtual-signal/signal-check"}
I tried:
Code: Select all
flow_buttons.button_apply.resize_to_sprite = false
note: added * before 1195 so it doesn't show a broken image icon.1850.734 Error MainLoop.cpp:*1195: Exception at tick 3628951: Error while running command "testgui": Expected sprite.
https://lua-api.factorio.com/latest/LuaGuiElement.html
Why I'm trying to resize the button:resize_to_sprite :: boolean [Read-Write]
Whether should the image widget resize its size according to the sprite in it (true by default)