Author Topic: UIGrid pivot problem  (Read 3020 times)

beveil

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 1
    • View Profile
UIGrid pivot problem
« on: November 06, 2014, 05:07:02 AM »
hi guys,my ngui version is 3.7.0
today i tried to use UIGrid to arrange my icon area and i found a problem:

i need to arrange my icons in 2 rows, and the order is from right to left(Horizonal)
so i first set the pivot to TopRight
then i set the column limit(MaxPerLine) to 4, when the icon number is over 4, the fifth icon will be set to the second row, but it under the fourth icon and i want it under the first icon.

so i checked UIGrid's private funtion ResetPosition(List<Transform> list), i found it doesn't flip horizintal. it just move all items in UIGrid with same offset.

my English is so poor, can you understand me? i just it can change like "b" to "d"(image it)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIGrid pivot problem
« Reply #1 on: November 07, 2014, 01:34:53 PM »
Use a negative value for cell size. Instead of cell width of 300 specify -300 for example.