Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Radiant on Thu 17/10/2013 20:23:34

Title: (solved) GUI label align
Post by: Radiant on Thu 17/10/2013 20:23:34
Is it possible to set the alignment (left/right/center) of a GUI label at runtime?
Title: Re: GUI label align
Post by: Crimson Wizard on Thu 17/10/2013 21:30:55
Hmm... I think not. ???
This strikes me why it was never added.

I think a workaround is to fill the label with spaces, or, better, get Gui's drawing surface and draw string yourself as you like.
Title: Re: GUI label align
Post by: Khris on Thu 17/10/2013 21:56:14
Or use two labels, one invisible.
Or get the text's width, and resize and/or reposition the label.

Should be relatively simple to add to the engine though, I guess.
Title: Re: GUI label align
Post by: Radiant on Thu 17/10/2013 22:01:27
Yeah, I can reposition the label as a workaround. I promised myself to stop sending more feature requests to the 3.3 team :P