Right-justify sprite in a LuaGuiElement?

Place to get help with not working mods / modding interface.
Post Reply
Theanderblast
Inserter
Inserter
Posts: 45
Joined: Fri Aug 19, 2016 2:48 pm
Contact:

Right-justify sprite in a LuaGuiElement?

Post 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.

Pandemoneus
Fast Inserter
Fast Inserter
Posts: 127
Joined: Fri May 08, 2015 2:25 pm
Contact:

Re: Right-justify sprite in a LuaGuiElement?

Post 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.
My RSO+Bob's+Angel's modpack: Farlands (outdated)
Mods (current): Resource Labels
Mods (old): Biter Spires

Post Reply

Return to “Modding help”

Who is online

Users browsing this forum: No registered users