Author Topic: How do I center a UIGrid?  (Read 2676 times)

CarlosMassiah

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 10
    • View Profile
How do I center a UIGrid?
« on: November 05, 2014, 07:25:19 AM »
Previously I have been using scroll views / clipping panels to center grids, but because of another problem I can't use that any more.
The issue I'm having is Grids don't center when I select the pivot to be the center  - it is offset by 1/3 to the left.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How do I center a UIGrid?
« Reply #1 on: November 06, 2014, 01:39:29 AM »
UIGrid offsets by 0.5 * cell size * number of cells. If your cells are perfectly centered, then it will look as you expect. If your cells use a different pivot point, such as top-left for example, then it won't. Remember, UIGrid works with transforms, not widgets.