Author Topic: UITable positioning.  (Read 2134 times)

vidjogamer

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 48
    • View Profile
UITable positioning.
« on: May 26, 2014, 11:29:21 AM »
Is is possible to have the table ignore certain widgets when calculating the bounds for an item? I am adding a square widget to a table with children widgets that stick out of the bounds of the square. I want the table to ignore the children that are sticking out when positioning these objects.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UITable positioning.
« Reply #1 on: May 26, 2014, 11:35:23 PM »
You could disable those objects before updating the table. Just make sure 'hideInactive' is set to 'true'.

dandrea

  • Newbie
  • *
  • Thank You
  • -Given: 6
  • -Receive: 2
  • Posts: 23
    • View Profile
Re: UITable positioning.
« Reply #2 on: May 31, 2014, 02:56:16 PM »
You could disable those objects before updating the table. Just make sure 'hideInactive' is set to 'true'.

There's one thing that doesn't seem to make much sense in UITable's behavior: it looks into clipped UIPanels when calculating objects bounds. Couldn't it be made to ignore protruding contents of clipped panels in future versions?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UITable positioning.
« Reply #3 on: June 01, 2014, 05:02:21 PM »
NGUIMath.CalculateRelativeWidgetBounds doesn't look inside clipped panels. It uses clipped panel's bounds instead. Line 455 of NGUIMath.cs. This is the same function that UITable uses to calculate content bounds (line 151 of UITable.cs).