Author Topic: UICenterOnChild 'set centeredObject'  (Read 1769 times)

jeldrez

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 4
  • Posts: 352
    • View Profile
UICenterOnChild 'set centeredObject'
« on: September 24, 2013, 09:05:36 AM »
There's anyway to set centeredObject in the UIGrid?

For example, it's an inventory and I want to show selected the equipped item. The way I see to do this is to set CenteredObject, but only gets.

Thanks!

jeldrez

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 4
  • Posts: 352
    • View Profile
Re: UICenterOnChild 'set centeredObject'
« Reply #1 on: September 24, 2013, 01:21:08 PM »
I tried moving the UIPanel to the pos of the current item, but it's moving the clipping area too. Can I change by scripting the clipping offset?
Is this the best way to do this?
« Last Edit: September 24, 2013, 01:28:51 PM by jeldrez »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UICenterOnChild 'set centeredObject'
« Reply #2 on: September 24, 2013, 01:40:13 PM »
Check the skyrim UI example in the useful stuff sticky. You use SpringPanel to position the panel's content on the object of your choice.

jeldrez

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 4
  • Posts: 352
    • View Profile
Re: UICenterOnChild 'set centeredObject'
« Reply #3 on: September 26, 2013, 12:31:14 PM »
Thanks Aren, at the end I used MoveRelative.