Author Topic: Center on child issue  (Read 3258 times)

Markov

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 27
    • View Profile
Center on child issue
« on: June 13, 2014, 09:42:52 AM »
Hello. I'm trying to add gamepad in our game. I need to make menu with lots of selectable elements. When user selects object which is out of screen bounds - elements scroll to this object. So it's very similar to scene Example 7 - Scroll View (Panel)
Is it possible make menu like in this scene, but without this gap when user selects first element?

I used to select middle object when selected first object, but I've got another gap:

SO the first object is little out of screen. And if I have 2 items on screen I event don't have this middle object.
« Last Edit: June 13, 2014, 10:38:00 AM by Markov »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Center on child issue
« Reply #1 on: June 13, 2014, 08:24:56 PM »
You wouldn't be using UICenterOnChild for this, because it wouldn't be centering on the child anymore. You will need to write custom logic here.