Author Topic: [SOLVED]UICenterOnChild with offset?  (Read 1976 times)

Genhain

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 38
    • View Profile
[SOLVED]UICenterOnChild with offset?
« on: October 30, 2014, 10:45:47 PM »
I was just going to make a child class and override any virtual functions to find this is a rather black boxed class. I cant immediately think of any way of having the scroll center On a child except with an offset in either x or y, while keeping the clipping regions exactly as is and where you want them, without modifying the existing class.
« Last Edit: November 02, 2014, 09:58:04 PM by Genhain »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UICenterOnChild with offset?
« Reply #1 on: November 01, 2014, 05:01:13 AM »
UICenterOnChild centers on transforms directly underneath. You can easily add an offset like so:

UICenterOnChild
- Child 1
-- Offset
--- Content
- Child 2
-- Offset
--- Content
- Child 3
-- Offset
--- Content

Of course alternatively you can just modify the UICenterOnChild, or create a custom version of it that includes an offset if you like.

Genhain

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 38
    • View Profile
Re: UICenterOnChild with offset?
« Reply #2 on: November 02, 2014, 09:43:51 PM »
I imagined there would be a way to achieve this through how you parented certain elements...and now that you say it. It makes perfect and simple sense, i must have been tired. Cheers Aren