Page 1 of 1
Right-justify sprite in a LuaGuiElement?
Posted: Thu Jun 29, 2017 3:03 pm
by Theanderblast
I want to put an icon in the right corner of my top level LuaGuiElement (which is a flow). How can I shove the icon over to the right side? I'm currently using a label with many blanks in it, but that's very dorky...
Thanks in advance.
Re: Right-justify sprite in a LuaGuiElement?
Posted: Fri Jun 30, 2017 2:28 pm
by Pandemoneus
I haven't done any GUI stuff in Factorio myself, so I will just try to give you an idea:
In the top row of your GUI (the GUI is most times a vertical flow), you could have a horizontal flow. Add another flow to the horizontal flow that has minWidth equal to (width of the parent horizontal flow - width of your icon - padding, if there is any). Then add your icon.