Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: rsoo on August 07, 2012, 02:49:12 PM

Title: best way to implement a leaderboard / scoreboard
Post by: rsoo 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!
Title: Re: best way to implement a leaderboard / scoreboard
Post by: dlewis 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.
Title: Re: best way to implement a leaderboard / scoreboard
Post by: ArenMook on August 07, 2012, 08:00:46 PM
Exactly as dlewis suggests.