Author Topic: Use a button to scroll using UIGrid  (Read 2917 times)

sparky

  • Guest
Use a button to scroll using UIGrid
« on: June 07, 2012, 12:05:21 PM »
Hi Guys

I am wanting to create a shop in my game and would like to use a UIGrid to sell my items (its an iphone game by the way). I want to have a next and previous button that scrolls through the items a bit like UIDragPanel without the dragging. Is this possible straight from NGUI or do I need to write some code, happy either way just cant see anything obvious in the package.

Cheers

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Use a button to scroll using UIGrid
« Reply #1 on: June 07, 2012, 12:08:55 PM »
UIGrid has no concepts of pages. It's simply used to align its children into a grid. That's all it's used for -- alignment. You will want to write some code to add children to your UIGrid object dynamically -- based on whatever page number you currently have selected.