Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Bilko on December 15, 2012, 06:11:31 AM
-
Hey all;
I use UScript and I am trying to figure out the best approach to setting up my high score leader board. Right now I have a Input where the player enters their name along with a submit button. For the display portion of the leader board (where the name and score are shown) what do I use? UILable? and just set it to multiline? I only want the top 10 shown in this space so it would be a fixed size no need to be scrollable.
Basically the way I would set it up would be to pull the name from the name input and score when the submit button is clicked, then combine the two to be displayed in the leader board.
Any and all help is greatly appreciated. Thanks.
-
UILabel will display text, yes. Seems like all you need is a label and give its 'text' property 10 names in the same string, separated by \n.
-
Use a grid with a single label for each line. Consider using one label for Names and another for Score
UILabel Name UILabel Score
Nicki 1000001
Bilko 2130
Where the name is left aligned and score is right aligned.
The way it's typed into the system and the way you will be showing it on screen are two separate things - you just save the score and name in some data form and read that for your leaderboard.
-
Thanks for the feedback guys.
Quick Question, when you say create a grid, in what sense do you mean, ie how do you do that? Or are you talking about the layout of the labels that would form a grid?
And how did my score become last on the leader board Niki LOL
-
Quick Question, when you say create a grid, in what sense do you mean
Use the UIGrid script (part of ngui)
-
Yeah, look into the UIGrid.cs file.
As for the score, well, I've just played your game much more than you... :P