* more changes to leaderboard
This commit is contained in:
parent
5152d2e0b4
commit
c20a8d0676
|
@ -26,21 +26,25 @@ local drawScoreboard = function (users, currentUserId)
|
||||||
gfx.FillColor(255,255,255);
|
gfx.FillColor(255,255,255);
|
||||||
end
|
end
|
||||||
|
|
||||||
gfx.FontSize(26)
|
|
||||||
gfx.Text('#' .. i .. ' ' .. u.name, x, y)
|
|
||||||
|
|
||||||
gfx.FontSize(26)
|
gfx.FontSize(26)
|
||||||
gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_MIDDLE)
|
gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_MIDDLE)
|
||||||
gfx.Text(string.format("%04d", math.floor(u.score/10000)), x+128+32, y)
|
gfx.Text(string.format("%04d", math.floor(u.score/10000)), x, y)
|
||||||
|
|
||||||
local lastFourDigits = ((u.score / 10000) - math.floor(u.score / 10000))*10000
|
local lastFourDigits = ((u.score / 10000) - math.floor(u.score / 10000))*10000
|
||||||
gfx.FontSize(22)
|
gfx.FontSize(22)
|
||||||
gfx.Text(string.format("%04d", math.floor(lastFourDigits)), x+186+32, y+1)
|
gfx.Text(string.format("%04d", math.floor(lastFourDigits)), x+58, y+1)
|
||||||
|
|
||||||
|
gfx.FontSize(26)
|
||||||
|
gfx.Text('#' .. i .. ' ' .. u.name, x+120, y)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local render = function (deltaTime, users, currentUserId)
|
local render = function (deltaTime, users, currentUserId)
|
||||||
local resx, resy = game.GetResolution();
|
local resx, resy = game.GetResolution();
|
||||||
|
|
||||||
|
drawScoreboard(users, currentUserId); -- TODO: for now
|
||||||
|
|
||||||
if (resx > resy) then
|
if (resx > resy) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
@ -60,7 +64,6 @@ local render = function (deltaTime, users, currentUserId)
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
|
|
||||||
drawScoreboard(users, currentUserId);
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in New Issue