From c4d151d1b35e127892c5b3087a1982e1c6bd557b Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sat, 29 May 2010 15:17:54 -0500 Subject: [PATCH] default theme changes from Midiman; includes StepsType changes --- .../ScreenEvaluation background/default.lua | 4 +- .../ScreenPlayerOptions background.lua | 4 +- .../ScreenSelectProfile overlay.lua | 63 ++++++++++--------- .../default.lua | 4 +- .../Graphics/StepsDisplay StepsType.lua | 1 + .../StepsDisplayListRow StepsType.lua | 5 +- Themes/default/Languages/en.ini | 2 + Themes/default/Scripts/03 ThemePrefs.lua | 37 +++++++++++ Themes/default/metrics.ini | 11 +++- 9 files changed, 93 insertions(+), 38 deletions(-) diff --git a/Themes/default/BGAnimations/ScreenEvaluation background/default.lua b/Themes/default/BGAnimations/ScreenEvaluation background/default.lua index cf1a255799..66623c2ad5 100644 --- a/Themes/default/BGAnimations/ScreenEvaluation background/default.lua +++ b/Themes/default/BGAnimations/ScreenEvaluation background/default.lua @@ -13,7 +13,7 @@ t[#t+1] = Def.ActorFrame { end end; }; - Def.Quad { +--[[ Def.Quad { InitCommand=cmd(scaletoclipped,SCREEN_WIDTH+1,SCREEN_HEIGHT); OnCommand=cmd(diffuse,color("#FFCB05");diffusebottomedge,color("#F0BA00");diffusealpha,0.45); }; @@ -21,7 +21,7 @@ t[#t+1] = Def.ActorFrame { InitCommand=cmd(customtexturerect,0,0,(SCREEN_WIDTH+1)/4,SCREEN_HEIGHT/4;SetTextureFiltering,true); OnCommand=cmd(zoomto,SCREEN_WIDTH+1,SCREEN_HEIGHT;diffuse,Color("Black");diffuseshift;effecttiming,(1/8)*4,0,(7/8)*4,0;effectclock,'beatnooffset'; effectcolor2,Color("Black");effectcolor1,Colors.Alpha(Color("Black"),0.45);fadebottom,0.25;fadetop,0.25;croptop,48/480;cropbottom,48/480;diffusealpha,0.345); - }; + }; --]] LoadActor(THEME:GetPathB("ScreenWithMenuElements","background/_bg top")) .. { InitCommand=cmd(scaletoclipped,SCREEN_WIDTH+1,SCREEN_HEIGHT); }; diff --git a/Themes/default/BGAnimations/ScreenPlayerOptions background.lua b/Themes/default/BGAnimations/ScreenPlayerOptions background.lua index c1171a84fc..5ac433168e 100644 --- a/Themes/default/BGAnimations/ScreenPlayerOptions background.lua +++ b/Themes/default/BGAnimations/ScreenPlayerOptions background.lua @@ -18,11 +18,11 @@ t[#t+1] = Def.ActorFrame { InitCommand=cmd(scaletoclipped,SCREEN_WIDTH+1,SCREEN_HEIGHT); OnCommand=cmd(diffuse,color("#FFCB05");diffusebottomedge,color("#F0BA00");diffusealpha,0.45); }; - LoadActor(THEME:GetPathB("ScreenWithMenuElements","background/_grid")).. { +--[[ LoadActor(THEME:GetPathB("ScreenWithMenuElements","background/_grid")).. { InitCommand=cmd(customtexturerect,0,0,(SCREEN_WIDTH+1)/4,SCREEN_HEIGHT/4;SetTextureFiltering,true); OnCommand=cmd(zoomto,SCREEN_WIDTH+1,SCREEN_HEIGHT;diffuse,Color("Black");diffuseshift;effecttiming,(1/8)*4,0,(7/8)*4,0;effectclock,'beatnooffset'; effectcolor2,Color("Black");effectcolor1,Colors.Alpha(Color("Black"),0.45);fadebottom,0.25;fadetop,0.25;croptop,48/480;cropbottom,48/480;diffusealpha,0.345); - }; + }; --]] LoadActor(THEME:GetPathB("ScreenWithMenuElements","background/_bg top")) .. { InitCommand=cmd(scaletoclipped,SCREEN_WIDTH+1,SCREEN_HEIGHT); }; diff --git a/Themes/default/BGAnimations/ScreenSelectProfile overlay.lua b/Themes/default/BGAnimations/ScreenSelectProfile overlay.lua index df149c6cda..2c30312feb 100644 --- a/Themes/default/BGAnimations/ScreenSelectProfile overlay.lua +++ b/Themes/default/BGAnimations/ScreenSelectProfile overlay.lua @@ -10,10 +10,10 @@ 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") .. { - 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"; @@ -28,6 +28,15 @@ 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 = {}; @@ -38,14 +47,15 @@ function LoadPlayerStuff(Player) }; --]] 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); + InitCommand=cmd(zoomto,200-10,40); OnCommand=cmd(diffuse,PlayerColor(Player);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 { @@ -146,6 +149,7 @@ function UpdateInternal3(self, Player) 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'); @@ -153,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); @@ -166,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); @@ -180,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); @@ -259,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); @@ -271,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/default/BGAnimations/ScreenWithMenuElements background/default.lua b/Themes/default/BGAnimations/ScreenWithMenuElements background/default.lua index 477fd8eff9..147d2899ef 100644 --- a/Themes/default/BGAnimations/ScreenWithMenuElements background/default.lua +++ b/Themes/default/BGAnimations/ScreenWithMenuElements background/default.lua @@ -6,11 +6,11 @@ t[#t+1] = Def.ActorFrame { InitCommand=cmd(scaletoclipped,SCREEN_WIDTH+1,SCREEN_HEIGHT); OnCommand=cmd(diffuse,color("#FFCB05");diffusebottomedge,color("#F0BA00")); }; - LoadActor("_grid") .. { +--[[ LoadActor("_grid") .. { InitCommand=cmd(customtexturerect,0,0,(SCREEN_WIDTH+1)/4,SCREEN_HEIGHT/4;SetTextureFiltering,true); OnCommand=cmd(zoomto,SCREEN_WIDTH+1,SCREEN_HEIGHT;diffuse,Color("Orange");diffuseshift;effecttiming,(1/8)*2,0,(7/8)*2,0;effectclock,'beatnooffset'; effectcolor2,Color("Orange");effectcolor1,Colors.Alpha(Color("Orange"),0.45);fadebottom,0.25;fadetop,0.25;croptop,48/480;cropbottom,48/480); - }; + }; --]] LoadActor("_bg top") .. { InitCommand=cmd(scaletoclipped,SCREEN_WIDTH+1,SCREEN_HEIGHT); }; diff --git a/Themes/default/Graphics/StepsDisplay StepsType.lua b/Themes/default/Graphics/StepsDisplay StepsType.lua index 590d7992d1..6d3aa4752d 100644 --- a/Themes/default/Graphics/StepsDisplay StepsType.lua +++ b/Themes/default/Graphics/StepsDisplay StepsType.lua @@ -1,5 +1,6 @@ local sString; local t = Def.ActorFrame{ + LoadFont("Common normal")..{ InitCommand=cmd(shadowlength,1); SetMessageCommand=function(self,param) diff --git a/Themes/default/Graphics/StepsDisplayListRow StepsType.lua b/Themes/default/Graphics/StepsDisplayListRow StepsType.lua index 9916616a20..7b2333402d 100644 --- a/Themes/default/Graphics/StepsDisplayListRow StepsType.lua +++ b/Themes/default/Graphics/StepsDisplayListRow StepsType.lua @@ -1,7 +1,10 @@ local sString; local t = Def.ActorFrame{ +--[[ LoadActor("TestStep") .. { + InitCommand=cmd(zoomto,20,20); + }; --]] LoadFont("Common normal")..{ - InitCommand=cmd(shadowlength,1;horizalign,left); + InitCommand=cmd(shadowlength,1;horizalign,left;zoom,0.45;skewx,-0.125); SetMessageCommand=function(self,param) sString = THEME:GetString("StepsListDisplayRow StepsType",ToEnumShortString(param.StepsType)); if param.Steps and param.Steps:IsAutogen() then diff --git a/Themes/default/Languages/en.ini b/Themes/default/Languages/en.ini index a514e2ca63..a8e48018e4 100644 --- a/Themes/default/Languages/en.ini +++ b/Themes/default/Languages/en.ini @@ -49,12 +49,14 @@ HelpText=&BACK; Exit &START; Move On &MENULEFT;+&MENURIGHT; or &SELECT; Snapshot LifeDifficulty=Life Difficulty: %s TimingDifficulty=Timing Difficulty: %s [OptionTitles] +UserPrefNotePosition=Note Positions UserPrefGameplayShowScore=Show Score UserPrefGameplayShowStepsDisplay=Show Steps UserPrefShowLotsaOptions=Options Density UserPrefAutoSetStyle=Auto Set Style UserPrefLongFail=Fail Length [OptionExplanations] +UserPrefNotePosition=Determines where the arrow receptors are placed in gameplay. UserPrefGameplayShowScore=Show or Hide the score display in gameplay. UserPrefGameplayShowStepsDisplay=Show or Hide the step information display in gameplay. UserPrefShowLotsaOptions=Choose how many lines/rows of options to choose from. &oq;Few&cq; keeps the list to a minimum. &oq;Many&cq; adds various show-off mods. diff --git a/Themes/default/Scripts/03 ThemePrefs.lua b/Themes/default/Scripts/03 ThemePrefs.lua index 8c89984bb8..c8a7748251 100644 --- a/Themes/default/Scripts/03 ThemePrefs.lua +++ b/Themes/default/Scripts/03 ThemePrefs.lua @@ -16,6 +16,9 @@ function InitUserPrefs() if GetUserPrefB("UserPrefLongFail") == nil then SetUserPref("UserPrefLongFail", false); end; + if GetUserPrefB("UserPrefNotePosition") == nil then + SetUserPref("UserPrefNotePosition", true); + end; --[[ if GetUserPref("ProTimingP1") == nil then SetUserPref("ProTimingP1", false); end; @@ -223,6 +226,40 @@ function UserPrefAutoSetStyle() end +function UserPrefNotePosition() + local t = { + Name = "UserPrefNotePosition"; + LayoutType = "ShowAllInRow"; + SelectType = "SelectOne"; + OneChoiceForAllPlayers = true; + ExportOnChange = false; + Choices = { 'Classic','Modern' }; + LoadSelections = function(self, list, pn) + if ReadPrefFromFile("UserPrefNotePosition") ~= nil then + if GetUserPrefB("UserPrefNotePosition") then + list[1] = true; + else + list[2] = true; + end; + else + WritePrefToFile("UserPrefNotePosition",false); + list[1] = true; + end; + end; + SaveSelections = function(self, list, pn) + local val; + if list[1] then + val = true; + else + val = false; + end; + WritePrefToFile("UserPrefNotePosition",val); + MESSAGEMAN:Broadcast("PrferenceSet", { Message == "Set Preference" } ); + end; + }; + setmetatable( t, t ); + return t; +end function UserPrefLongFail() local t = { Name = "UserPrefLongFail"; diff --git a/Themes/default/metrics.ini b/Themes/default/metrics.ini index 3ee039dbda..8ef8840371 100644 --- a/Themes/default/metrics.ini +++ b/Themes/default/metrics.ini @@ -289,6 +289,10 @@ ProtimingW4Command= ProtimingW5Command= ProtimingMissCommand= +[Player] +# In The Groove +ReceptorArrowsYStandard=GetTapPosition('Standard') +ReceptorArrowsYReverse=GetTapPosition('Reverse') [ScoreDisplayPercentage Percent] PercentP1OnCommand=shadowlength,1;diffuse,PlayerColor(PLAYER_1);diffusetopedge,BoostColor(PlayerColor(PLAYER_1),1.5) PercentP2OnCommand=shadowlength,1;diffuse,PlayerColor(PLAYER_2);diffusetopedge,BoostColor(PlayerColor(PLAYER_2),1.5) @@ -483,7 +487,7 @@ AutogenSetCommand= ShowStepsType=true StepsTypeX=-64-8 StepsTypeY=0 -StepsTypeOnCommand=zoom,0.45;skewx,-0.125 +StepsTypeOnCommand= StepsTypeSetCommand= [StreamDisplay] @@ -543,7 +547,7 @@ ShowHeader=false ShowFooter=false [ScreenOptions] -ContainerOnCommand=zoomy,0;bounceend,0.35;zoomy,1 +PageOnCommand=zoomy,0;bounceend,0.35;zoomy,1 CursorOnCommand= LineHighlightOnCommand=cropleft,0.1;cropright,0.1;zoomx,1.3;fadeleft,0.25;faderight,0.25;diffuseramp;effectcolor2,color("1,1,1,0.5");effectcolor1,color("1,1,1,0.25");effectclock,'beat' @@ -656,8 +660,9 @@ ItemsLongRowSharedX=SCREEN_CENTER_X [ScreenOptionsTheme] Fallback="ScreenOptionsServiceChild" -LineNames="gScore,gSDisp,gOpts,gLongFail" +LineNames="gNotePos,gScore,gSDisp,gOpts,gLongFail," #,gAuto +LinegNotePos="lua,UserPrefNotePosition()" LinegScore="lua,UserPrefGameplayShowScore()" LinegSDisp="lua,UserPrefGameplayShowStepsDisplay()" LinegOpts="lua,UserPrefShowLotsaOptions()"