Author Topic: Layout  (Read 5459 times)

jz87

  • Guest
Layout
« on: April 16, 2012, 11:29:48 AM »
There doesn't seem to be a lot of support for layout in NGUI (or not a lot of documentation about it). I need to be able to align my UI controls to top, bottom, left, right of the screen and to each other. What is the best way to do this with NGUI?

jz87

  • Guest
Re: Layout
« Reply #1 on: April 16, 2012, 11:46:05 AM »
Just to clarify, I would like to dock UI controls to the sides/corners of the game window.

Ghost1082

  • Guest
Re: Layout
« Reply #2 on: April 16, 2012, 11:54:41 AM »
Anchors.
Attach an NGUI component called an Anchor to your panel.
This will allow you to set its location on screen (left, right, top center, etc)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Layout
« Reply #3 on: April 16, 2012, 01:06:42 PM »
It's the very first example.. it even has a full writeup: http://www.tasharen.com/?page_id=619

How could you have missed it? o_O