Hi Guys, i have a GuiLayout.Button and a GuiLayout.Label in the same line… The Button must be at the left, the label must be at the center…
I have this:
I tried, but with flexiblespace the string isn’t at the center of window… With flexiblespace the string is at the center between the end of Gui.Button and the end of gui.window…
The string must be at the center of the gui.window! Under the string “Compra merce”
Oh I see what you mean, well it’s pretty simple to workaround just split it into 2 layout areas (one for the button and one for the label) and use FlexibleSpace in the area with the label.
PS: the label’s area should have the “box” and be created before the button’s in the code. You probably need to tweak the rect x/y position of the button’s area to be aligned to the label. Of course you can also act the reverse way (that is button’s is “box” and tweak the label’s rect)
I inserted the rect dimension in BeginArea manually…
Is there a way to obtain the GUILayout.BeginHorizontal (“box”) rect and insert it into BeginArea?
Instead to insert manually the rect dimension into BeginArea
(I am aware that I am responding to a 8 years old message)
I think you misunderstood the question. This is for Editor UI. Custom menus. Therefore “Screen.” is irrelevant here.