High Scores tweak

(cherry picked from commit fa4e5efb5b0d8dcd73ed3e43d993d7e98b73e347)
This commit is contained in:
Jonathan Payne
2014-08-28 06:01:14 -05:00
committed by freem
parent 8f0e2246f9
commit c36068faf8
2 changed files with 17 additions and 15 deletions
@@ -7,9 +7,13 @@ local NumColumns = THEME:GetMetric(Var "LoadingScreen", "NumColumns");
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y-160);
Def.Quad {
InitCommand=cmd(zoomto,SCREEN_WIDTH, 32);
OnCommand=cmd(y,-16;diffuse,Color.Black;fadebottom,0.8);
};
Def.Quad {
InitCommand=cmd(zoomto,SCREEN_WIDTH, 56);
OnCommand=cmd(diffuse,color("#333333");diffusealpha,0.75;fadebottom,0.35;fadetop,0.35);
OnCommand=cmd(diffuse,color("#333333");diffusealpha,0.75;fadebottom,0.35);
};
};
@@ -19,20 +23,23 @@ for i=1,NumColumns do
local s = GetCustomDifficulty( st, dc );
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(x,SCREEN_CENTER_X-60 + 80 * (i-1);y,SCREEN_CENTER_Y-160);
LoadActor("_difficulty frame") .. {
OnCommand=cmd(diffuse,CustomDifficultyToColor(s);zoomtowidth,80);
InitCommand=cmd(x,SCREEN_CENTER_X-60 + 80 * (i-1);y,SCREEN_CENTER_Y-168);
LoadActor(THEME:GetPathB("_frame","3x1"),"rounded fill", 18) .. {
OnCommand=cmd(diffuse,CustomDifficultyToDarkColor(s);diffusealpha,0.5);
};
LoadActor(THEME:GetPathB("_frame","3x1"),"rounded gloss", 18) .. {
OnCommand=cmd(diffuse,CustomDifficultyToColor(s);diffusealpha,0.35);
};
LoadFont("Common Normal") .. {
InitCommand=cmd(uppercase,true;settext,CustomDifficultyToLocalizedString(s));
OnCommand=cmd(zoom,0.75;diffuse,CustomDifficultyToColor(s);shadowlength,1);
OnCommand=cmd(zoom,0.675;maxwidth,80/0.675;diffuse,CustomDifficultyToColor(s);shadowlength,1);
};
};
end
t[#t+1] = LoadFont("Common Bold") .. {
InitCommand=cmd(settext,stString;x,SCREEN_CENTER_X-220;y,SCREEN_CENTER_Y-160);
OnCommand=cmd(zoom,0.75;skewx,-0.125;shadowlength,1);
InitCommand=cmd(settext,stString;x,SCREEN_CENTER_X-220;y,SCREEN_CENTER_Y-168);
OnCommand=cmd(zoom,0.675;skewx,-0.125;shadowlength,1);
};
t.OnCommand=cmd(draworder,105);
@@ -73,22 +73,17 @@ Scores.SetCommand=function(self, params)
if CurrentItem then
local hsl = pProfile:GetHighScoreList(Current, CurrentItem);
local hs = hsl and hsl:GetHighScores();
--[[Warn( tostring(CurrentItem:GetStepsType()) .. ", " ..
tostring(CurrentItem:GetDifficulty()) .. ": " ..
tostring(hsl) .. ", " ..
tostring(#hs) );]]
local name = c[idx .. "Name"];
local score = c[idx .. "Score"];
local filled = c[idx .. "Filled"];
local empty = c[idx .. "Empty"];
--assert( c[sNameType], sNameType );
--assert( c[sScoreType], sScoreType );
name:visible( true );
score:visible( true );
filled:visible( true );
empty:visible( false );
if hs and #hs > 0 then
name:settext( hs[1]:GetName() );
score:settext( FormatPercentScore( hs[1]:GetPercentDP() ) );