From 05135e23573d835b166d3fa23a7be78a7e4061c7 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sun, 25 Apr 2010 18:50:43 -0500 Subject: [PATCH] some ScreenSelectProfile stuff --- .../ScreenSelectProfile overlay.lua | 25 ++++++++----------- Themes/default/Languages/en.ini | 2 +- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/Themes/default/BGAnimations/ScreenSelectProfile overlay.lua b/Themes/default/BGAnimations/ScreenSelectProfile overlay.lua index f2905017a9..f3f28d038a 100644 --- a/Themes/default/BGAnimations/ScreenSelectProfile overlay.lua +++ b/Themes/default/BGAnimations/ScreenSelectProfile overlay.lua @@ -13,8 +13,13 @@ function GetLocalProfiles() InitCommand=cmd(shadowlength,1;y,-9;ztest,true); }; LoadFont("Common Normal") .. { - Text=profile:GetNumTotalSongsPlayed() .. " Songs Played"; InitCommand=cmd(shadowlength,1;y,9;zoom,0.5;vertspacing,-8;ztest,true); + BeginCommand=function(self) + local numSongsPlayed = profile:GetNumTotalSongsPlayed(); + local s = numSongsPlayed == 1 and "Song" or "Songs"; + -- todo: localize + self:settext( numSongsPlayed.." "..s.." Played" ); + end; }; }; table.insert( ret, item ); @@ -26,12 +31,7 @@ end; function LoadPlayerStuff(Player) local ret = {}; - local pn; - if Player == PLAYER_1 then - pn = 1; - else - pn = 2; - end; + local pn = (Player == PLAYER_1) and 1 or 2; --[[ local t = LoadActor(THEME:GetPathB('', '_frame 3x3'), 'metal', 200, 230) .. { Name = 'BigFrame'; @@ -132,8 +132,8 @@ function LoadPlayerStuff(Player) }; --]] t = LoadFont("Common Normal") .. { Name = 'SelectedProfileText'; - InitCommand=cmd(y,160); - OnCommand=cmd(shadowlength,1); + --InitCommand=cmd(y,160;shadowlength,1;diffuse,PlayerColor(Player)); + InitCommand=cmd(y,160;shadowlength,1;); }; table.insert( ret, t ); @@ -141,12 +141,7 @@ function LoadPlayerStuff(Player) end; function UpdateInternal3(self, Player) - local pn; - if Player == PLAYER_1 then - pn = 1; - else - pn = 2; - end; + local pn = (Player == PLAYER_1) and 1 or 2; local frame = self:GetChild(string.format('P%uFrame', pn)); local scroller = frame:GetChild('Scroller'); local seltext = frame:GetChild('SelectedProfileText'); diff --git a/Themes/default/Languages/en.ini b/Themes/default/Languages/en.ini index b54e695a29..fa833fa640 100644 --- a/Themes/default/Languages/en.ini +++ b/Themes/default/Languages/en.ini @@ -13,7 +13,7 @@ Explanation=Quick Setup provides a easy way to set commonly-changed and useful p [ScreenProfileLoad] HelpText=... Loading profiles, please wait ... [ScreenSelectProfile] -HelpText=&BACK; Cancel &START; Select / Join &MENULEFT;&MENURIGHT; Move +HelpText=&MENUUP;&MENUDOWN; Switch Profile &START; Choose/Join &BACK; Unselect [ScreenSelectMaster] HelpText=&BACK; Exit &START; Select / Join &MENULEFT;&MENURIGHT; Move [ScreenSelectPlayMode]