Add a real High Scores screen.

(cherry picked from commit 4c5bfa5e0eb351a0d90c70413a7cd8622007d188)
This commit is contained in:
Jonathan Payne
2014-08-28 06:01:12 -05:00
committed by freem
parent 6453b8b04a
commit 8f0e2246f9
21 changed files with 392 additions and 36 deletions
+37
View File
@@ -2,6 +2,10 @@ local mainMaxWidth = 228; -- zoom w/subtitle is 0.75 (multiply by 1.25)
local subMaxWidth = 420; -- zoom is 0.6 (multiply zoom,1 value by 1.4)
local artistMaxWidth = 300/0.8;
local mainMaxWidthHighScore = 192; -- zoom w/subtitle is 0.75 (multiply by 1.25)
local subMaxWidthHighScore = 280; -- zoom is 0.6 (multiply zoom,1 value by 1.4)
local artistMaxWidthHighScore = 280/0.8;
--[[
-- The old (cmd(blah))(Actor) syntax is hard to read.
-- This is longer, but much easier to read. - Colby
@@ -38,3 +42,36 @@ function TextBannerAfterSet(self,param)
Artist:y(10)
end
end
function TextBannerHighScoreAfterSet(self,param)
local Title = self:GetChild("Title")
local Subtitle = self:GetChild("Subtitle")
local Artist = self:GetChild("Artist")
if Subtitle:GetText() == "" then
Title:maxwidth(mainMaxWidthHighScore)
Title:y(-8)
Title:zoom(1)
-- hide so that the game skips drawing.
Subtitle:visible(false)
Artist:zoom(0.66)
Artist:maxwidth(artistMaxWidthHighScore)
Artist:y(8)
else
Title:maxwidth(mainMaxWidthHighScore*1.25)
Title:y(-11)
Title:zoom(0.75)
-- subtitle below title
Subtitle:visible(true)
Subtitle:zoom(0.6)
Subtitle:y(0)
Subtitle:maxwidth(subMaxWidthHighScore)
Artist:zoom(0.6)
Artist:maxwidth(artistMaxWidthHighScore)
Artist:y(10)
end
end