Author Topic: best way to implement a leaderboard / scoreboard  (Read 3984 times)

rsoo

  • Guest
best way to implement a leaderboard / scoreboard
« on: August 07, 2012, 02:49:12 PM »
Hi all, I couldn't find any related topics on the forums so I started a new topic..

I was just wondering what you guys think would be the best way to implement a leaderboard using ngui.
My original idea was to have multi UITextLists (one for each column) and populate each column from a sorted list of score objects, but that seems a bit clunky to me.
I'm open to any suggestions, thanks!

dlewis

  • Guest
Re: best way to implement a leaderboard / scoreboard
« Reply #1 on: August 07, 2012, 06:29:47 PM »
The way I do lists (ie. player roster, scoreboard) is to have a UIGrid and below that have a 'referenceObject' which is just a single entry which contains all the things a single scoreboard/player roster entry need (like player name, score, background graphics if it's a button) then I have a script that dynamically instantiates that X number of times, parents it to the UIGrid and then repositions the grid so that it's a nice list.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: best way to implement a leaderboard / scoreboard
« Reply #2 on: August 07, 2012, 08:00:46 PM »
Exactly as dlewis suggests.