From b22095e052a676d982428f9689d8894d6dbc6719 Mon Sep 17 00:00:00 2001 From: Jonathan Payne Date: Sun, 19 Sep 2010 20:00:20 -0700 Subject: [PATCH 1/2] this should have been here in the first place --- .../ScreenSelectProfile CardBackground.png | Bin 0 -> 3489 bytes .../Graphics/ScreenSelectProfile CardFrame.png | Bin 0 -> 4305 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 Themes/_fallback/Graphics/ScreenSelectProfile CardBackground.png create mode 100644 Themes/_fallback/Graphics/ScreenSelectProfile CardFrame.png diff --git a/Themes/_fallback/Graphics/ScreenSelectProfile CardBackground.png b/Themes/_fallback/Graphics/ScreenSelectProfile CardBackground.png new file mode 100644 index 0000000000000000000000000000000000000000..046958618d37dd4b9a423ea0ab952a1364faea84 GIT binary patch literal 3489 zcmZ8jc|4R||GtNbu}^kM&&V$ORv3&K`x-_@DoZg+vZQR$OtPiNzB3}(mqez78cTK~ zWF1Skga=QSDB(B5^FF`#^Zs$}?|q%mIoEZ4uXFx5(HAWY*_cl;0|3BgY@}yRt)Hml zZwLeR>jPOvQVWx}k^Nl&VBw+-5RjS84*<-TH&LjI7u~)5yzaVtdBcoRD44gem)p(T zt^g1)PO!nEZI*bocBZzFrct9t zC|E^>O99|uz^Ow-Bmj7v0dN~^*ulS_tAs8}Q*F0DvObJ0oF)U#^WeGI8rc0BOYXg$7`JK;L@kiJG;X))P0L0wa)51iB-!oX{uv7Yy|ex0{j4Zn=_=k3y!)lOXUnYMbYCLVW0#4qafZL& zupIst8a&%->{5r3=AN_S^oiBWe7dPra5fs5DD_cn;PA%mw9Fp8_OvQcbxRu*oFH3# z^*a3zQwb=>k2Jdj02}pQO`jzp^f>phnLhu+b)9{~TrmLWW}N5)0N3#17a;-@lqj`28cRJ#J{8$Y9R>um+Owie{83o=Ye*SlYx zEoUujJ5_b5oW4GK`+DCie=sLrpTwjF_D8~;&*&Oq%rF+CM#ZqxqADlHna(rOKelR? zIGa>#`da+m$)BzKE=r1#7$X^xV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 zPXC%$u@_D~9atf4n~+tozHdsj=DqncX%k;;k1rzqG?Ny>o_5WBmTp z;PM&9!9VT`VTI&xAu~5J4YF)9_Z(at-dXl&_YW^m1^qUp{K1i}0=Ew|*+h5V9AA1g zn1tQvdrC+lgoMidoN%H%Ck8KGCr{tv@LGQd^_v;cKa5$_Y|tcM*?8->QB7IkvU_Wn z`BKBtbJ=ehevmY1*kE;T8KfGU4gl8sR2|QIOFcN=uK#zDwgo5i*coAdFWFiVq zT+F_AX*OiSvH5Qk4_T7NkO%<6;}8fKj5aP*`YdsL4GcBiNSI&t=}%Y}T_02l@nkMe z_OrFUkxN3#EV_>U}z7jo=@sz7r_llzysirV%u0MXHbno4$~0A2`~$_}Do zS~R$$crMg`oNlfihKs$c-Ez3d0=BpSg$6Lvts|(U>qi{_%D`a9P0{p^xz?#!{M#v5 zlo|sBVnMRIKoh6_8&S(>)=O#}v_pW#9}6lxd(}jDd^S`cPG0Y6$sRePd!+OIBInqu6_vNR>Tk9u9)JSLzAGLD46a%Bx|LXq8 zWR)eN_E#+j=E!~nJyq=on>#;)CDSm2N^E}7@s8Xq+ygzFCrB%?AqegF?Uj1&^tU6mvC(jOku1M0h#W%=Z-OezG7^)2)&kxq~P E56L(TdjJ3c literal 0 HcmV?d00001 diff --git a/Themes/_fallback/Graphics/ScreenSelectProfile CardFrame.png b/Themes/_fallback/Graphics/ScreenSelectProfile CardFrame.png new file mode 100644 index 0000000000000000000000000000000000000000..d35a9311680c9ca568f00cbd823f6bc5453f04fc GIT binary patch literal 4305 zcmZ8jc{r3^*nh^1F_vM7Y|&sW*_W|47&8pAZy_y|j3uEI63y62gtCuDl3hh9TiLQ^ zY!SxNghVgiNXYh$@4c??kMB9xIrsHE=iKN1{qEm=uJa_?TARW-L^uEdfSa2c+cWJT zv;PZ&GRGj;GLC831I=7-0s!Z+qYeUc^MwF_!^Q`Xx3%>S2oAXE9T12#$K#QKHv+tT zu3ZIy&`F8|(a~Y)xc=76Z=6K}>5)Z%y#N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X|MBNT!h=EUqjXB&%c>FtP6IRBNl|E vU&_E(s~c*{mh1yMc?1xM<-ex4;|C}oo*6C>uhC}S8GyNowQ)7hJ?eh|`D33+ literal 0 HcmV?d00001 From 60c371c16989f7c0a4164abd85acbd23ef50f84f Mon Sep 17 00:00:00 2001 From: Jonathan Payne Date: Sun, 19 Sep 2010 20:00:44 -0700 Subject: [PATCH 2/2] simplify --- .../ScreenSelectProfile overlay.lua | 92 ++++---- .../ScreenSelectProfile overlay.lua | 215 ------------------ 2 files changed, 47 insertions(+), 260 deletions(-) delete mode 100644 Themes/themekit/BGAnimations/ScreenSelectProfile overlay.lua diff --git a/Themes/_fallback/BGAnimations/ScreenSelectProfile overlay.lua b/Themes/_fallback/BGAnimations/ScreenSelectProfile overlay.lua index bca356e760..8355b85580 100644 --- a/Themes/_fallback/BGAnimations/ScreenSelectProfile overlay.lua +++ b/Themes/_fallback/BGAnimations/ScreenSelectProfile overlay.lua @@ -10,11 +10,16 @@ function GetLocalProfiles() }; --]] LoadFont("Common Normal") .. { Text=profile:GetDisplayName(); - InitCommand=cmd(shadowlength,1;y,-9;zoom,0.95;ztest,true); + InitCommand=cmd(shadowlength,1;y,-10;zoom,1;ztest,true); }; LoadFont("Common Normal") .. { - Text=profile:GetNumTotalSongsPlayed() .. " Songs Played"; - InitCommand=cmd(shadowlength,1;y,9;zoom,0.5;vertspacing,-8;ztest,true); + InitCommand=cmd(shadowlength,1;y,8;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 ); @@ -23,29 +28,34 @@ function GetLocalProfiles() return ret; end; +function LoadCard(cColor) + local t = Def.ActorFrame { + LoadActor( THEME:GetPathG("ScreenSelectProfile","CardBackground") ) .. { + InitCommand=cmd(diffuse,cColor); + }; + LoadActor( THEME:GetPathG("ScreenSelectProfile","CardFrame") ); + }; + return t +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'; }; --]] local t = Def.ActorFrame { Name = 'JoinFrame'; - Def.Quad { + LoadCard(Color('Orange')); +--[[ Def.Quad { InitCommand=cmd(zoomto,200+4,230+4); OnCommand=cmd(shadowlength,1;diffuse,color("0,0,0,0.5")); }; Def.Quad { InitCommand=cmd(zoomto,200,230); OnCommand=cmd(diffuse,Color('Orange');diffusealpha,0.5); - }; + }; --]] LoadFont("Common Normal") .. { Text="Press &START; to join."; InitCommand=cmd(shadowlength,1); @@ -56,14 +66,7 @@ function LoadPlayerStuff(Player) t = Def.ActorFrame { Name = 'BigFrame'; - Def.Quad { - InitCommand=cmd(zoomto,200+4,230+4); - OnCommand=cmd(shadowlength,1); - }; - Def.Quad { - InitCommand=cmd(zoomto,200,230); - OnCommand=cmd(diffuse,PlayerColor(Player)); - }; + LoadCard(PlayerColor(Player)); }; table.insert( ret, t ); @@ -78,21 +81,21 @@ function LoadPlayerStuff(Player) }; --]] InitCommand=cmd(y,-2); Def.Quad { - InitCommand=cmd(zoomto,200,40+2); + InitCommand=cmd(zoomto,200-10,40+2); OnCommand=cmd(diffuse,Color('Black');diffusealpha,0.5); }; Def.Quad { - InitCommand=cmd(zoomto,200,40); - OnCommand=cmd(diffuse,PlayerColor(Player);glow,color("1,1,1,0.25")); + InitCommand=cmd(zoomto,200-10,40); + OnCommand=cmd(diffuse,PlayerColor(Player);fadeleft,0.25;faderight,0.25;glow,color("1,1,1,0.25")); }; Def.Quad { - InitCommand=cmd(zoomto,200,40;y,-40/2+20); + InitCommand=cmd(zoomto,200-10,40;y,-40/2+20); OnCommand=cmd(diffuse,Color("Black");fadebottom,1;diffusealpha,0.35); }; Def.Quad { - InitCommand=cmd(zoomto,200,1;y,-40/2+1); + InitCommand=cmd(zoomto,200-10,1;y,-40/2+1); OnCommand=cmd(diffuse,PlayerColor(Player);glow,color("1,1,1,0.25")); - }; + }; }; table.insert( ret, t ); @@ -100,7 +103,7 @@ function LoadPlayerStuff(Player) Name = 'Scroller'; NumItemsToDraw=6; -- InitCommand=cmd(y,-230/2+20;); - OnCommand=cmd(SetFastCatchup,true;SetMask,200,50;SetSecondsPerItem,0.15); + OnCommand=cmd(y,1;SetFastCatchup,true;SetMask,200,58;SetSecondsPerItem,0.15); TransformFunction=function(self, offset, itemIndex, numItems) local focus = scale(math.abs(offset),0,2,1,0); self:visible(false); @@ -115,14 +118,14 @@ function LoadPlayerStuff(Player) t = Def.ActorFrame { Name = "EffectFrame"; - Def.Quad { - InitCommand=cmd(y,-230/2;vertalign,top;zoomto,200,8;fadebottom,1); - OnCommand=cmd(diffuse,Color("Black");diffusealpha,0.25); - }; - Def.Quad { - InitCommand=cmd(y,230/2;vertalign,bottom;zoomto,200,8;fadetop,1); - OnCommand=cmd(diffuse,Color("Black");diffusealpha,0.25); - }; + --[[ Def.Quad { + InitCommand=cmd(y,-230/2;vertalign,top;zoomto,200,8;fadebottom,1); + OnCommand=cmd(diffuse,Color("Black");diffusealpha,0.25); + }; + Def.Quad { + InitCommand=cmd(y,230/2;vertalign,bottom;zoomto,200,8;fadetop,1); + OnCommand=cmd(diffuse,Color("Black");diffusealpha,0.25); + }; --]] }; table.insert( ret, t ); --[[ t = Def.BitmapText { @@ -133,8 +136,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 ); @@ -142,15 +145,11 @@ 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'); + local joinframe = frame:GetChild('JoinFrame'); local smallframe = frame:GetChild('SmallFrame'); local bigframe = frame:GetChild('BigFrame'); @@ -158,6 +157,7 @@ function UpdateInternal3(self, Player) frame:visible(true); if MEMCARDMAN:GetCardState(Player) == 'MemoryCardState_none' then --using profile if any + joinframe:visible(false); smallframe:visible(true); bigframe:visible(true); seltext:visible(true); @@ -171,6 +171,7 @@ function UpdateInternal3(self, Player) scroller:SetDestinationItem(0); self:queuecommand('UpdateInternal2'); else + joinframe:visible(true); smallframe:visible(false); bigframe:visible(false); scroller:visible(false); @@ -185,6 +186,7 @@ function UpdateInternal3(self, Player) SCREENMAN:GetTopScreen():SetProfileIndex(Player, 0); end; else + joinframe:visible(true); scroller:visible(false); seltext:visible(false); smallframe:visible(false); @@ -218,7 +220,7 @@ local t = Def.ActorFrame { end; end; end; - if params.Name == 'Down' or params.Name == 'Down2' or params.Name == 'DownRight' then + if params.Name == 'Down' or params.Name == 'Down2' or params.Name == 'DownRight' then if GAMESTATE:IsHumanPlayer(params.PlayerNumber) then local ind = SCREENMAN:GetTopScreen():GetProfileIndex(params.PlayerNumber); if ind > 0 then @@ -264,7 +266,7 @@ local t = Def.ActorFrame { OffCommand=cmd(bouncebegin,0.35;zoom,0); PlayerJoinedMessageCommand=function(self,param) if param.Player == PLAYER_1 then - (cmd(bouncebegin,0.175;zoom,1.15;bounceend,0.175;zoom,1.0;))(self); + (cmd(;zoom,1.15;bounceend,0.175;zoom,1.0;))(self); end; end; children = LoadPlayerStuff(PLAYER_1); @@ -276,7 +278,7 @@ local t = Def.ActorFrame { OffCommand=cmd(bouncebegin,0.35;zoom,0); PlayerJoinedMessageCommand=function(self,param) if param.Player == PLAYER_2 then - (cmd(bouncebegin,0.175;zoom,1.15;bounceend,0.175;zoom,1.0;))(self); + (cmd(zoom,1.15;bounceend,0.175;zoom,1.0;))(self); end; end; children = LoadPlayerStuff(PLAYER_2); diff --git a/Themes/themekit/BGAnimations/ScreenSelectProfile overlay.lua b/Themes/themekit/BGAnimations/ScreenSelectProfile overlay.lua deleted file mode 100644 index 402e76dbed..0000000000 --- a/Themes/themekit/BGAnimations/ScreenSelectProfile overlay.lua +++ /dev/null @@ -1,215 +0,0 @@ -function GetLocalProfiles() - local ret = {}; - - for p = 0,PROFILEMAN:GetNumLocalProfiles()-1 do - local profile=PROFILEMAN:GetLocalProfileFromIndex(p); - local item = Def.ActorFrame { - LoadFont("Common Normal") .. { - Text=profile:GetDisplayName(); - InitCommand=cmd(shadowlength,1;y,-9); - }; - LoadFont("Common Normal") .. { - Text=profile:GetNumTotalSongsPlayed() .. " Songs Played"; - InitCommand=cmd(shadowlength,1;y,8;zoom,0.5;vertspacing,-8); - }; - }; - table.insert( ret, item ); - end; - return ret; -end; - -function LoadPlayerStuff(Player) - local ret = {}; - - local pn; - if Player == PLAYER_1 then - pn = 1; - else - pn = 2; - end; - ---[[ local t = LoadActor(THEME:GetPathB('', '_frame 3x3'), 'metal', 200, 230) .. { - Name = 'BigFrame'; - }; --]] - local t = Def.ActorFrame { - Name = 'BigFrame'; - Def.Quad { - InitCommand=cmd(zoomto,200+4,230+4); - OnCommand=cmd(shadowlength,1); - }; - Def.Quad { - InitCommand=cmd(zoomto,200,230); - OnCommand=cmd(diffuse,color("0.25,0,0.15,1")); - }; - }; - table.insert( ret, t ); - ---[[ t = LoadActor(THEME:GetPathB('', '_frame 3x3'), 'metal', 170, 20) .. { - Name = 'SmallFrame'; - }; --]] - t = Def.ActorFrame { - Name = 'SmallFrame'; ---[[ Def.Quad { - InitCommand=cmd(zoomto,170+4,32+4); - OnCommand=cmd(shadowlength,1); - }; --]] - Def.Quad { - InitCommand=cmd(zoomto,200,40); - OnCommand=cmd(diffuse,color("0.25,0.5,0.15,1")); - }; - }; - table.insert( ret, t ); - - t = Def.ActorScroller{ - Name = 'Scroller'; - NumItemsToDraw=4; --- InitCommand=cmd(y,-230/2+20;); - OnCommand=cmd(SetFastCatchup,true;SetMask,200,230;SetSecondsPerItem,0.15); - TransformFunction=function(self, offset, itemIndex, numItems) - local focus = scale(math.abs(offset),0,2,1,0); - self:visible(false); - self:y(math.floor( offset*40 )); --- self:zoomy( focus ); --- self:z(-math.abs(offset)); --- self:zoom(focus); - end; - children = GetLocalProfiles(); - }; - table.insert( ret, t ); - ---[[ t = Def.BitmapText { - OnCommand = cmd(y,160); - Name = 'SelectedProfileText'; - Font = "Common Normal"; - Text = 'No profile'; - }; --]] - t = LoadFont("Common Normal") .. { - Name = 'SelectedProfileText'; - InitCommand=cmd(y,160); - OnCommand=cmd(shadowlength,1); - }; - table.insert( ret, t ); - - return ret; -end; - -function UpdateInternal3(self, Player) - local pn; - if Player == PLAYER_1 then - pn = 1; - else - pn = 2; - end; - local frame = self:GetChild(string.format('P%uFrame', pn)); - local scroller = frame:GetChild('Scroller'); - local seltext = frame:GetChild('SelectedProfileText'); - local smallframe = frame:GetChild('SmallFrame'); - - if GAMESTATE:IsHumanPlayer(Player) then - frame:visible(true); - if MEMCARDMAN:GetCardState(Player) == 'MemoryCardState_none' then ---using profile if any - smallframe:visible(true); - scroller:visible(true); - local ind = SCREENMAN:GetTopScreen():GetProfileIndex(Player); - if ind > 0 then - scroller:SetDestinationItem(ind-1); - seltext:settext(PROFILEMAN:GetLocalProfileFromIndex(ind-1):GetDisplayName()); - else - if SCREENMAN:GetTopScreen():SetProfileIndex(Player, 1) then - scroller:SetDestinationItem(0); - self:queuecommand('UpdateInternal2'); - else - smallframe:visible(false); - scroller:visible(false); - seltext:settext('No profile'); - end; - end; - else ---using card - smallframe:visible(false); - scroller:visible(false); - seltext:settext('CARD'); - SCREENMAN:GetTopScreen():SetProfileIndex(Player, 0); - end; - else - frame:visible(false); - end; -end; - -local t = Def.ActorFrame { - - StorageDevicesChangedMessageCommand=function(self, params) - self:queuecommand('UpdateInternal2'); - end; - - CodeMessageCommand = function(self, params) - if params.Name == 'Start' then - if not GAMESTATE:IsHumanPlayer(params.PlayerNumber) then - SCREENMAN:GetTopScreen():SetProfileIndex(params.PlayerNumber, -1); - else - SCREENMAN:GetTopScreen():Finish(); - end; - end; - if params.Name == 'Up' then - if GAMESTATE:IsHumanPlayer(params.PlayerNumber) then - local ind = SCREENMAN:GetTopScreen():GetProfileIndex(params.PlayerNumber); - if ind > 1 then - if SCREENMAN:GetTopScreen():SetProfileIndex(params.PlayerNumber, ind - 1 ) then - self:queuecommand('UpdateInternal2'); - end; - end; - end; - end; - if params.Name == 'Down' then - if GAMESTATE:IsHumanPlayer(params.PlayerNumber) then - local ind = SCREENMAN:GetTopScreen():GetProfileIndex(params.PlayerNumber); - if ind > 0 then - if SCREENMAN:GetTopScreen():SetProfileIndex(params.PlayerNumber, ind + 1 ) then - self:queuecommand('UpdateInternal2'); - end; - end; - end; - end; - if params.Name == 'Back' then - if GAMESTATE:GetNumPlayersEnabled()==0 then - SCREENMAN:GetTopScreen():Cancel(); - else - SCREENMAN:GetTopScreen():SetProfileIndex(params.PlayerNumber, -2); - end; - end; - end; - - PlayerJoinedMessageCommand=function(self, params) - self:queuecommand('UpdateInternal2'); - end; - - PlayerUnjoinedMessageCommand=function(self, params) - self:queuecommand('UpdateInternal2'); - end; - - OnCommand=function(self, params) - self:queuecommand('UpdateInternal2'); - end; - - UpdateInternal2Command=function(self) - UpdateInternal3(self, PLAYER_1); - UpdateInternal3(self, PLAYER_2); - end; - children = { - Def.ActorFrame { - Name = 'P1Frame'; - InitCommand=cmd(x,SCREEN_CENTER_X-160;y,SCREEN_CENTER_Y;); - OnCommand=cmd(hide_if,not GAMESTATE:IsHumanPlayer(PLAYER_1);); - children = LoadPlayerStuff(PLAYER_2); - }; - Def.ActorFrame { - Name = 'P2Frame'; - InitCommand=cmd(x,SCREEN_CENTER_X+160;y,SCREEN_CENTER_Y;); - OnCommand=cmd(hide_if,not GAMESTATE:IsHumanPlayer(PLAYER_2);); - children = LoadPlayerStuff(PLAYER_2); - }; - }; -}; - -return t;