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.
Right-justify sprite in a LuaGuiElement?
-
- Inserter
- Posts: 46
- Joined: Fri Aug 19, 2016 2:48 pm
- Contact:
-
- Fast Inserter
- Posts: 127
- Joined: Fri May 08, 2015 2:25 pm
- Contact:
Re: Right-justify sprite in a LuaGuiElement?
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.
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.
My RSO+Bob's+Angel's modpack: Farlands (outdated)
Mods (current): Resource Labels
Mods (old): Biter Spires
Mods (current): Resource Labels
Mods (old): Biter Spires