Author Topic: UIScrollview + UI buttons problem  (Read 3336 times)

Jinghis

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 3
    • View Profile
UIScrollview + UI buttons problem
« on: August 11, 2014, 01:26:22 PM »
Hi guys!

I got a major problem, and I have viewed a lot of topic about this, but still no clue how to figure out what to do.
My simple hierarchy is:
-TabSprite ( UIDrag Scroll view )
  -Panel ( UIScroll view)
   -UIWrap content
     - A lot of sprites :D ( Of course with box collider)

And I want to make all the sprites in the TabSprite into UIButtons. There is a simple presentation as attachment. So every sprite is a separate button. And I don't know how to manage to interact these.
Thanks in advance for your help :).

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIScrollview + UI buttons problem
« Reply #1 on: August 12, 2014, 04:08:59 AM »
UIWrapContent calls "onInitializeItem" callback for every single item that gets added to the list. You can dynamically change the content of each item inside.

Jinghis

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: UIScrollview + UI buttons problem
« Reply #2 on: August 14, 2014, 04:09:14 PM »
Thanks for the help, I have finally figured it out, how to get it work ^^. But I have a serious issue here. How could this happening? Can someone help me, how to get the panel above the scroll view? I would be really thankful ^^.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIScrollview + UI buttons problem
« Reply #3 on: August 15, 2014, 07:32:53 AM »
To place something above a scroll view you need an extra UIPanel. Remember, scroll views themselves use a new panel too.

Jinghis

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: UIScrollview + UI buttons problem
« Reply #4 on: August 16, 2014, 11:50:22 AM »
To place something above a scroll view you need an extra UIPanel. Remember, scroll views themselves use a new panel too.
Thank you, you helped a lot :)