Author Topic: Center GUI Label Horizontally  (Read 1388 times)


  • Playmaker Newbie
  • *
  • Posts: 4
    • View Profile
Center GUI Label Horizontally
« on: July 19, 2013, 06: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.


  • Administrator
  • Hero Member
  • *****
  • Posts: 15371
  • Official Playmaker Support
    • View Profile
Re: Center GUI Label Horizontally
« Reply #1 on: July 28, 2013, 10:04:03 AM »

 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.