Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: ConnersCraft on July 19, 2013, 09:51:29 PM

Title: Center GUI Label Horizontally
Post by: ConnersCraft on July 19, 2013, 09:51:29 PM
I am creating the main menu for my new game. The title of the game appears at the top. How can I make a GUI label stay centered horizontally no matter what screen size the user has? Also as a side question, I have some GUI buttons. What value should be put in the "left" field to keep these centered? Thanks for the help.
Title: Re: Center GUI Label Horizontally
Post by: jeanfabre on July 28, 2013, 01:04:03 PM
Hi,

 create an horizontal area ( guiLayoutStartHorizontal), add a flexible space before and after the label and done.

 the other way is to create a custom gui skin and define the centering in the custom skin itself, it's definitly cleaner this way if you plan on doing this in various places.

bye,

 Jean