Hi guys,
I would appreciate your help.
I want to place in the UPPER RIGHT screen corner something like this.
Score: 10 / 20
– 10 is score
– 20 is highscore
Values 10 and 20 dynamically change… depending on the game play (they all start from zero).
Problem is when you play too long and scoring is over 100 and over 1000 text alignment is messed up.
Digits go left as they increase.
local score = 0 local highScore = 0 local scoreText = display.newText( ("Score: " .. score .. " / ", .. highScore), 0, 0, native.systemFont, 18 ) scoreText.x = screenRight scoreText.y = scoreText.height
I have read a lot of this topic, and did not find efficient solution.
I do not want zero digits before score, like mentioned in here:
https://forums.coronalabs.com/topic/24352-centering-text/
How to align this properly for any score value from 0 to 99999?
Many thanks!
Ivan


