Author Topic: UI Table's top left positioned at the centre of screen.  (Read 2077 times)

dwjkim

  • Guest
UI Table's top left positioned at the centre of screen.
« on: August 30, 2013, 02:54:09 AM »
How do I fix this?

I want the centre of the UI Table to be at the centre of screen.

I tried using Translate method to translate the transform of the UITable.

The problem of that method is that it translates the entire panel or maybe so that when I press the cancel button the ring menu is shifted in a wrong position.

So that would mean if I use translate I would have to put translate back in every cancel function?

http://www.tasharen.com/forum/index.php?topic=1385.0

I tried using the code in the above link but still if I press the cancel button it shifts the entire panel.

Apparently the table seems to share the transform with the whole panel.
« Last Edit: August 30, 2013, 03:09:57 AM by dwjkim »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UI Table's top left positioned at the centre of screen.
« Reply #1 on: August 30, 2013, 05:05:51 PM »
Use NGUIMath.Calculate series of functions to determine the width and height of the table, then offset it by half of that.