From 881f175e6c2257cd9cff5b7750be80d8576f9f11 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Thu, 18 Jul 2013 17:43:01 -0400 Subject: [PATCH] Revert "Themekit for PIU handled." This reverts commit 91611d3624e6eedbf5681a3fb63893153aebb26a. --- .../_themekit-piu/BGAnimations/Screen in.lua | 6 +- .../_themekit-piu/BGAnimations/Screen out.lua | 6 +- .../default.lua | 2 +- .../default.lua | 45 +++-------- .../ScreenGameOver underlay/default.lua | 6 +- .../BGAnimations/ScreenGameplay out.lua | 6 +- .../ScreenGameplay overlay/default.lua | 22 +----- .../BGAnimations/ScreenGameplay underlay.lua | 5 +- .../ScreenNextStage underlay/default.lua | 6 +- .../ScreenProfileLoad overlay.lua | 9 +-- .../ScreenProfileSave overlay.lua | 9 +-- .../ScreenSelectMusic overlay/default.lua | 77 ++++-------------- .../ScreenSelectMusic underlay.lua | 17 ++-- .../ScreenStageBreak underlay/default.lua | 6 +- .../ScreenStageInformation underlay.lua | 4 +- .../ScreenSystemLayer overlay.lua | 74 ++++------------- .../ScreenTitleMenu underlay/default.lua | 6 +- .../ScreenWithMenuElements background.lua | 12 +-- .../_themekit-piu/BGAnimations/_frame 3x1.lua | 26 +----- .../default.lua | 7 +- .../default.lua | 4 +- .../Graphics/Player judgment/default.lua | 79 +------------------ .../Graphics/ScreenMapControllers exit.lua | 12 +-- .../Graphics/ScreenTitleMenu scroll.lua | 7 ++ Themes/_themekit-piu/Scripts/02 Draw.lua | 6 +- 25 files changed, 86 insertions(+), 373 deletions(-) diff --git a/Themes/_themekit-piu/BGAnimations/Screen in.lua b/Themes/_themekit-piu/BGAnimations/Screen in.lua index de6f8ba2c0..4ad6ca4625 100644 --- a/Themes/_themekit-piu/BGAnimations/Screen in.lua +++ b/Themes/_themekit-piu/BGAnimations/Screen in.lua @@ -1,5 +1 @@ -return Def.Actor { - OnCommand=function(self) - self:sleep(0.3); - end; -} \ No newline at end of file +return Def.Actor { OnCommand=cmd(sleep,0.3); } \ No newline at end of file diff --git a/Themes/_themekit-piu/BGAnimations/Screen out.lua b/Themes/_themekit-piu/BGAnimations/Screen out.lua index 0e0b7a8350..4ad6ca4625 100644 --- a/Themes/_themekit-piu/BGAnimations/Screen out.lua +++ b/Themes/_themekit-piu/BGAnimations/Screen out.lua @@ -1,5 +1 @@ -return Def.Actor { - OnCommand=function(self) - self:sleep(0.3); - end; -} \ No newline at end of file +return Def.Actor { OnCommand=cmd(sleep,0.3); } \ No newline at end of file diff --git a/Themes/_themekit-piu/BGAnimations/ScreenCustomOptionsList overlay/default.lua b/Themes/_themekit-piu/BGAnimations/ScreenCustomOptionsList overlay/default.lua index cbe2befd15..93d6f6bfb3 100644 --- a/Themes/_themekit-piu/BGAnimations/ScreenCustomOptionsList overlay/default.lua +++ b/Themes/_themekit-piu/BGAnimations/ScreenCustomOptionsList overlay/default.lua @@ -168,7 +168,7 @@ local function OptionsListDisplay(player) self:playcommand("SetChoices"); --self:diffuse(color("#000000")); end; - + -- cmd(diffuse,color("#000000")); ChoiceToggleMessageCommand=function(self,params) if params.PlayerNumber ~= player then return end if params.Row ~= k then return end diff --git a/Themes/_themekit-piu/BGAnimations/ScreenEvaluationNormal overlay/default.lua b/Themes/_themekit-piu/BGAnimations/ScreenEvaluationNormal overlay/default.lua index 11bbeed3fc..af25c713f6 100644 --- a/Themes/_themekit-piu/BGAnimations/ScreenEvaluationNormal overlay/default.lua +++ b/Themes/_themekit-piu/BGAnimations/ScreenEvaluationNormal overlay/default.lua @@ -15,11 +15,7 @@ local function Labels() local _ = idx-1 t[#t+1] = LoadFont("_arial black 20px")..{ Text=k; - InitCommand=function(self) - self:y(_ * 40); - self:diffuse(color("#000000")); - self:Stroke(color("#ffffff")); - end; + InitCommand=cmd(y,_*40;diffuse,color("#000000");Stroke,color("#ffffff")); }; end @@ -71,11 +67,7 @@ local function Scores(player) t[#t+1] = LoadFont("_arial black 20px")..{ Text=string.format("%03d", number); --curstats:GetTapNoteScores(k) - InitCommand=function(self) - self:y(_ * 40); - self:diffuse(color("#000000")); - self:Stroke(color("#ffffff")); - end; + InitCommand=cmd(y,_*40;diffuse,color("#000000");Stroke,color("#ffffff")); }; end @@ -99,47 +91,28 @@ local function Grade(player) return LoadFont("_impact 50px")..{ Text=captions[grade]; + --OnCommand=cmd(zoom,2;diffuse,color("#000000");Stroke,color("#ffffff");diffusealpha,0;sleep,1;linear,1;zoom,1;diffuse,color("#000000");Stroke,color("#ffffff");;diffusealpha,1); } end return Def.ActorFrame { LoadFont("_impact 50px")..{ Text="Evaluation"; - InitCommand=function(self) - self:CenterX(); - self:y(50); - self:diffuse(color("#000000")); - self:Stroke(color("#ffffff")); - end; + InitCommand=cmd(CenterX;y,50;diffuse,color("#000000");Stroke,color("#ffffff")); }; Labels()..{ - InitCommand=function(self) - self:CenterX(); - self:FromTop(130); - end; + InitCommand=cmd(CenterX;FromTop,130); }; Scores(PLAYER_1)..{ - InitCommand=function(self) - self:FromCenterX(-160); - self:FromTop(130); - end; + InitCommand=cmd(FromCenterX,-160;FromTop,130); }; Scores(PLAYER_2)..{ - InitCommand=function(self) - self:FromCenterX(160); - self:FromTop(130); - end; + InitCommand=cmd(FromCenterX,160;FromTop,130); }; Grade(PLAYER_1)..{ - InitCommand=function(self) - self:FromLeft(50); - self:FromTop(240); - end; + InitCommand=cmd(FromLeft,50;FromTop,240); }; Grade(PLAYER_2)..{ - InitCommand=function(self) - self:FromRight(-50); - self:FromTop(240); - end; + InitCommand=cmd(FromRight,-50;FromTop,240); }; } \ No newline at end of file diff --git a/Themes/_themekit-piu/BGAnimations/ScreenGameOver underlay/default.lua b/Themes/_themekit-piu/BGAnimations/ScreenGameOver underlay/default.lua index 4d55b5788c..f13882ac24 100644 --- a/Themes/_themekit-piu/BGAnimations/ScreenGameOver underlay/default.lua +++ b/Themes/_themekit-piu/BGAnimations/ScreenGameOver underlay/default.lua @@ -1,10 +1,6 @@ return Def.ActorFrame { LoadFont("_impact 50px")..{ Text="THE GAME IS OVER"; - InitCommand=function(self) - self:Center(); - self:diffuse(color("#000000")); - self:Stroke(color("#ffffff")); - end; + InitCommand=cmd(Center;diffuse,color("#000000");Stroke,color("#ffffff")); }; } \ No newline at end of file diff --git a/Themes/_themekit-piu/BGAnimations/ScreenGameplay out.lua b/Themes/_themekit-piu/BGAnimations/ScreenGameplay out.lua index 27181f3028..405cbf7623 100644 --- a/Themes/_themekit-piu/BGAnimations/ScreenGameplay out.lua +++ b/Themes/_themekit-piu/BGAnimations/ScreenGameplay out.lua @@ -1,5 +1 @@ -return Def.Actor { - OnCommand=function(self) - self:sleep(1); - end; -} \ No newline at end of file +return Def.Actor { OnCommand=cmd(sleep,1); } \ No newline at end of file diff --git a/Themes/_themekit-piu/BGAnimations/ScreenGameplay overlay/default.lua b/Themes/_themekit-piu/BGAnimations/ScreenGameplay overlay/default.lua index 30bf8c6020..f0189f6f51 100644 --- a/Themes/_themekit-piu/BGAnimations/ScreenGameplay overlay/default.lua +++ b/Themes/_themekit-piu/BGAnimations/ScreenGameplay overlay/default.lua @@ -11,9 +11,7 @@ local function LifeDisplay(pn) end return Def.ActorFrame { - InitCommand=function(self) - self:player(pn); - self:SetUpdateFunction(update); + InitCommand=cmd(player,pn;SetUpdateFunction,update); LoadFont("_arial black 20px")..{ --Text="100%"; @@ -24,21 +22,9 @@ end return Def.ActorFrame { LoadFont("_impact 50px")..{ - InitCommand=function(self) - self:CenterX(); - self:FromTop(30); + InitCommand=cmd(CenterX;FromTop,30); Text=string.format("%02i", STATSMAN:GetStagesPlayed()+1); }; - LifeDisplay(PLAYER_1)..{ - InitCommand=function(self) - self:FromCenterX(-160); - self:FromTop(20); - end; - }; - LifeDisplay(PLAYER_2)..{ - InitCommand=function(self) - self:FromCenterX(160); - self:FromTop(20); - end; - }; + LifeDisplay(PLAYER_1)..{ InitCommand=cmd(FromCenterX,-160;FromTop,20); }; + LifeDisplay(PLAYER_2)..{ InitCommand=cmd(FromCenterX,160;FromTop,20); }; } \ No newline at end of file diff --git a/Themes/_themekit-piu/BGAnimations/ScreenGameplay underlay.lua b/Themes/_themekit-piu/BGAnimations/ScreenGameplay underlay.lua index d86f057960..b1bb3cd79b 100644 --- a/Themes/_themekit-piu/BGAnimations/ScreenGameplay underlay.lua +++ b/Themes/_themekit-piu/BGAnimations/ScreenGameplay underlay.lua @@ -76,9 +76,7 @@ local function update(self) end return Def.ActorFrame { - InitCommand=function(self) - self:SetUpdateFunction(update); - end; + InitCommand=cmd(SetUpdateFunction,update); SpeedModLaunchedMessageCommand=function(self,params) local approach = params.Approach local value = params.Value @@ -113,4 +111,5 @@ return Def.ActorFrame { --SCREENMAN:SystemMessage(playerstate:GetPlayerOptions('ModsLevel_Preferred')); --SCREENMAN:SystemMessage(value) end; + --LoadFont()..{ Name="_debug"; InitCommand=cmd(x,50;CenterY;rotationz,90); }; } \ No newline at end of file diff --git a/Themes/_themekit-piu/BGAnimations/ScreenNextStage underlay/default.lua b/Themes/_themekit-piu/BGAnimations/ScreenNextStage underlay/default.lua index b4d0ec947a..4a335d868d 100644 --- a/Themes/_themekit-piu/BGAnimations/ScreenNextStage underlay/default.lua +++ b/Themes/_themekit-piu/BGAnimations/ScreenNextStage underlay/default.lua @@ -1,10 +1,6 @@ return Def.ActorFrame { LoadFont("_impact 50px")..{ Text="Try next stage"; - InitCommand=function(self) - self:Center(); - self:diffuse(color("#000000")); - self:Stroke(color("#ffffff")); - end; + InitCommand=cmd(Center;diffuse,color("#000000");Stroke,color("#ffffff")); }; } \ No newline at end of file diff --git a/Themes/_themekit-piu/BGAnimations/ScreenProfileLoad overlay.lua b/Themes/_themekit-piu/BGAnimations/ScreenProfileLoad overlay.lua index 792c7da900..0ad1c12434 100644 --- a/Themes/_themekit-piu/BGAnimations/ScreenProfileLoad overlay.lua +++ b/Themes/_themekit-piu/BGAnimations/ScreenProfileLoad overlay.lua @@ -12,15 +12,10 @@ return Def.ActorFrame { end; -- Draw.Box(SCREEN_WIDTH,50)..{ - InitCommand=function(self) self:Center(); end; + InitCommand=cmd(Center); }; LoadFont("_arial black 20px")..{ Text="Loading Profiles..."; - InitCommand=function(self) - self:Center(); - self:skewx(-0.1); - self:diffuse(color("#000000")); - self:Stroke(color("#ffffff")); - end; + InitCommand=cmd(Center;skewx,-0.1;diffuse,color("#000000");Stroke,color("#ffffff")); }; } \ No newline at end of file diff --git a/Themes/_themekit-piu/BGAnimations/ScreenProfileSave overlay.lua b/Themes/_themekit-piu/BGAnimations/ScreenProfileSave overlay.lua index d3dd86200e..0798fe9d22 100644 --- a/Themes/_themekit-piu/BGAnimations/ScreenProfileSave overlay.lua +++ b/Themes/_themekit-piu/BGAnimations/ScreenProfileSave overlay.lua @@ -12,15 +12,10 @@ return Def.ActorFrame { end; -- Draw.Box(SCREEN_WIDTH,50)..{ - InitCommand=function(self) self:Center(); end; + InitCommand=cmd(Center); }; LoadFont("_arial black 20px")..{ Text="Saving Profiles..."; - InitCommand=function(self) - self:Center(); - self:skewx(-0.1); - self:diffuse(color("#000000")); - self:Stroke(color("#ffffff")); - end; + InitCommand=cmd(Center;skewx,-0.1;diffuse,color("#000000");Stroke,color("#ffffff")); }; } \ No newline at end of file diff --git a/Themes/_themekit-piu/BGAnimations/ScreenSelectMusic overlay/default.lua b/Themes/_themekit-piu/BGAnimations/ScreenSelectMusic overlay/default.lua index 9ab189369a..f37397ab33 100644 --- a/Themes/_themekit-piu/BGAnimations/ScreenSelectMusic overlay/default.lua +++ b/Themes/_themekit-piu/BGAnimations/ScreenSelectMusic overlay/default.lua @@ -17,18 +17,8 @@ local function ModIcons(p) }; LoadActor("i can flash")..{ Name="sfx"; - InitCommand=function(self) - self:blend(Blend.Add); - self:zoom(0.125); - end; - SFXCommand=function(self) - self:stoptweening(); - self:diffusealpha(1); - self:zoom(0.5); - self:linear(0.2); - self:zoom(1); - self:diffusealpha(0); - end; + InitCommand=cmd(blend,Blend.Add;zoom,0.125); + SFXCommand=cmd(stoptweening;diffusealpha,1;zoom,0.5;linear,0.2;zoom,1;diffusealpha,0); }; } end @@ -47,12 +37,8 @@ local function ModIcons(p) self:SetLoop(true); self:playcommand("Set"); end; - PlayerOptionsChangedMessageCommand=function(self) - self:playcommand("Set"); - end; - PlayerJoinedMessageCommand=function(self) - self:playcommand("Set"); - end; + PlayerOptionsChangedMessageCommand=cmd(playcommand,"Set"); + PlayerJoinedMessageCommand=cmd(playcommand,"Set"); --Here's where the magic happens SetCommand=function(self) local playermods = GAMESTATE:GetPlayerState(p):GetPlayerOptionsArray('ModsLevel_Preferred') @@ -205,69 +191,34 @@ local function SongInformationDisplay() self:diffusealpha(0); self:queuecommand("Set") end; - OffCommand=function(self) - self:finishtweening(); - end; + OffCommand=cmd(finishtweening); }; end return Def.ActorFrame { DifficultyMeter(PLAYER_1)..{ - InitCommand=function(self) - self:FromCenterX(-120); - self:FromTop(100); - self:zoom(0.75); - self:diffuse(color("#646464")); - self:Stroke(color("#ffffff")); - end; - CurrentStepsP1ChangedMessageCommand=function(self) - self:playcommand("Set"); - end; + InitCommand=cmd(FromCenterX,-120;FromTop,100;zoom,0.75;diffuse,color("#646464");Stroke,color("#ffffff")); + CurrentStepsP1ChangedMessageCommand=cmd(playcommand,"Set"); }; DifficultyMeter(PLAYER_2)..{ - InitCommand=function(self) - self:FromCenterX(120); - self:FromTop(100); - self:zoom(0.75); - self:diffuse(color("#646464")); - self:Stroke(color("#ffffff")); - end; - CurrentStepsP2ChangedMessageCommand=function(self) - self:playcommand("Set"); - end; + InitCommand=cmd(FromCenterX,120;FromTop,100;zoom,0.75;diffuse,color("#646464");Stroke,color("#ffffff")); + CurrentStepsP2ChangedMessageCommand=cmd(playcommand,"Set"); }; Draw.RoundBox(SCREEN_WIDTH*0.75+10,50,color("#ffffff"))..{ - InitCommand=function(self) - self:CenterX(); - self:FromBottom(-75); - end; + InitCommand=cmd(CenterX;FromBottom,-75); }; Draw.RoundBox(SCREEN_WIDTH*0.75,40,5,5,color("#0000c8"))..{ - InitCommand=function(self) - self:CenterX(); - self:FromBottom(-75); - end; + InitCommand=cmd(CenterX;FromBottom,-75); }; SongInformationDisplay()..{ - InitCommand=function(self) - self:CenterX(); - self:FromBottom(-75); - self:diffuse(color("#009600")); - self:Stroke(color("#000000")); - end; + InitCommand=cmd(CenterX;FromBottom,-75;diffuse,color("#009600");Stroke,color("#000000")); }; ModIcons(PLAYER_1)..{ - InitCommand=function(self) - self:FromLeft(30); - self:FromTop(240); - end; + InitCommand=cmd(FromLeft,30;FromTop,240); Condition=not GetUserPrefB("OptionsMode"); }; ModIcons(PLAYER_2)..{ - InitCommand=function(self) - self:FromRight(-30); - self:FromTop(240); - end; + InitCommand=cmd(FromRight,-30;FromTop,240); Condition=not GetUserPrefB("OptionsMode"); }; } \ No newline at end of file diff --git a/Themes/_themekit-piu/BGAnimations/ScreenSelectMusic underlay.lua b/Themes/_themekit-piu/BGAnimations/ScreenSelectMusic underlay.lua index 182fbfd943..c0678bb310 100644 --- a/Themes/_themekit-piu/BGAnimations/ScreenSelectMusic underlay.lua +++ b/Themes/_themekit-piu/BGAnimations/ScreenSelectMusic underlay.lua @@ -53,21 +53,14 @@ return Def.ActorFrame { --SCREENMAN:SystemMessage(ToEnumShortString(player).." mods: "..playermods); end; LoadSound("START")..{ - OffCommand=function(self) - self:play(); + OffCommand=cmd(play); }; LoadSound("ScreenSelectMusic","Options")..{ - PlayerOptionsChangedMessageCommand=function(self) - self:stop(); - self:play(); + PlayerOptionsChangedMessageCommand=cmd(stop;play); }; LoadSound("3-2")..{ - SongChosenMessageCommand=function(self) - self:stop(); - self:play(); - end; - OffCommand=function(self) - self:play(); - end; + --TwoPartConfirmCanceledMessageCommand=cmd(play); + SongChosenMessageCommand=cmd(stop;play); + OffCommand=cmd(play); }; } diff --git a/Themes/_themekit-piu/BGAnimations/ScreenStageBreak underlay/default.lua b/Themes/_themekit-piu/BGAnimations/ScreenStageBreak underlay/default.lua index 2eeafa6180..9b5240467b 100644 --- a/Themes/_themekit-piu/BGAnimations/ScreenStageBreak underlay/default.lua +++ b/Themes/_themekit-piu/BGAnimations/ScreenStageBreak underlay/default.lua @@ -1,10 +1,6 @@ return Def.ActorFrame { LoadFont("_impact 50px")..{ Text="Epic fail..."; - InitCommand=function(self) - self:Center(); - self:diffuse(color("#000000")); - self:Stroke(color("#ffffff")); - end; + InitCommand=cmd(Center;diffuse,color("#000000");Stroke,color("#ffffff")); }; } \ No newline at end of file diff --git a/Themes/_themekit-piu/BGAnimations/ScreenStageInformation underlay.lua b/Themes/_themekit-piu/BGAnimations/ScreenStageInformation underlay.lua index 9434108153..cff6516117 100644 --- a/Themes/_themekit-piu/BGAnimations/ScreenStageInformation underlay.lua +++ b/Themes/_themekit-piu/BGAnimations/ScreenStageInformation underlay.lua @@ -20,7 +20,5 @@ if not path then end return LoadActor(path)..{ - InitCommand=function(self) - self:scaletocover(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); - end; + InitCommand=cmd(scaletocover,0,0,SCREEN_WIDTH,SCREEN_HEIGHT); }; \ No newline at end of file diff --git a/Themes/_themekit-piu/BGAnimations/ScreenSystemLayer overlay.lua b/Themes/_themekit-piu/BGAnimations/ScreenSystemLayer overlay.lua index 21b5ecee32..0ec55273af 100644 --- a/Themes/_themekit-piu/BGAnimations/ScreenSystemLayer overlay.lua +++ b/Themes/_themekit-piu/BGAnimations/ScreenSystemLayer overlay.lua @@ -7,9 +7,7 @@ local function PlayerName(player) return LoadFont("_arial black 20px")..{ --Text="PlaceHolder"; - InitCommand=function(self) - self:zoomx(1); - end; + InitCommand=cmd(zoomx,1); SetCommand=function(self) self:settext(""); if PROFILEMAN:IsPersistentProfile(player) then @@ -26,38 +24,17 @@ local function PlayerName(player) self:settext(name) end end; - PlayerJoinedMessageCommand=function(self) - self:playcommand("Set"); - end; - CoinInsertedMessageCommand=function(self) - self:playcommand("Set"); - end; - CoinModeChangedMessageCommand=function(self) - self:playcommand("Set"); - end; - ScreenChangedMessageCommand=function(self) - self:playcommand("Set"); - end; - StorageDevicesChangedMessageCommand=function(self) - self:playcommand("Set"); - end; + PlayerJoinedMessageCommand=cmd(playcommand,"Set"); + CoinInsertedMessageCommand=cmd(playcommand,"Set"); + CoinModeChangedMessageCommand=cmd(playcommand,"Set"); + ScreenChangedMessageCommand=cmd(playcommand,"Set"); + StorageDevicesChangedMessageCommand=cmd(playcommand,"Set"); }; end return Def.ActorFrame { LoadFont("_fixedsys")..{ - InitCommand=function(self) - self:blend('BlendMode_Add'); - self:xy(10, 5); - self:shadowlength(0); - self:Stroke(0, 0, 0, 1); - self:wrapwidthpixels(SCREEN_WIDTH * 0.45); - self:maxwidth(SCREEN_WIDTH * 0.45); - self:horizalign(left); - self:SetTextureFiltering(false); - self:vertalign(top); - self:zoom(1.5); - end; + InitCommand=cmd(blend,'BlendMode_Add'xy,10,5;shadowlength,0;Stroke,{0,0,0,1};wrapwidthpixels,SCREEN_WIDTH*0.45;maxwidth,SCREEN_WIDTH*0.45;horizalign,left;SetTextureFiltering,false;vertalign,top;zoom,1.5); SystemMessageMessageCommand=function(self,params) self:settext(params.Message); self:finishtweening(); @@ -65,18 +42,11 @@ return Def.ActorFrame { self:sleep(3); self:diffusealpha(0); end; - HideSystemMessageMessageCommand=function(self) - self:finishtweening(); - end; + HideSystemMessageMessageCommand=cmd(finishtweening); }; LoadFont("_arial black 20px")..{ - InitCommand=function(self) - self:xy(SCREEN_CENTER_X, SCREEN_HEIGHT - 20); - self:zoom(1); - self:shadowlength(0); - self:playcommand("Text"); - end; + InitCommand=cmd(xy,SCREEN_CENTER_X,SCREEN_HEIGHT-20;zoom,1;shadowlength,0;playcommand,"Text"); TextCommand=function(self) if GAMESTATE:GetCoinMode() == 'CoinMode_Home' then self:settext("Home Mode"); @@ -84,18 +54,10 @@ return Def.ActorFrame { self:settext("Free Play") end end; - PlayerJoinedMessageCommand=function(self) - self:playcommand("Text"); - end; - CoinInsertedMessageCommand=function(self) - self:playcommand("Text"); - end; - CoinModeChangedMessageCommand=function(self) - self:playcommand("Text"); - end; - ScreenChangedMessageCommand=function(self) - self:playcommand("Text"); - end; + PlayerJoinedMessageCommand=cmd(playcommand,"Text"); + CoinInsertedMessageCommand=cmd(playcommand,"Text"); + CoinModeChangedMessageCommand=cmd(playcommand,"Text"); + ScreenChangedMessageCommand=cmd(playcommand,"Text"); }; ScreenChangedMessageCommand=function(self) @@ -103,15 +65,9 @@ return Def.ActorFrame { end; PlayerName(PLAYER_1)..{ - InitCommand=function(self) - self:xy(20, SCREEN_HEIGHT - 20); - self:horizalign(left); - end; + InitCommand=cmd(xy,20,SCREEN_HEIGHT-20;horizalign,left); }; PlayerName(PLAYER_2)..{ - InitCommand=function(self) - self:xy(SCREEN_WIDTH - 20, SCREEN_HEIGHT - 20); - self:horizalign(right); - end; + InitCommand=cmd(xy,SCREEN_WIDTH-20,SCREEN_HEIGHT-20;horizalign,right); }; } diff --git a/Themes/_themekit-piu/BGAnimations/ScreenTitleMenu underlay/default.lua b/Themes/_themekit-piu/BGAnimations/ScreenTitleMenu underlay/default.lua index 8a043dddb4..20508d98b1 100644 --- a/Themes/_themekit-piu/BGAnimations/ScreenTitleMenu underlay/default.lua +++ b/Themes/_themekit-piu/BGAnimations/ScreenTitleMenu underlay/default.lua @@ -1,10 +1,6 @@ return Def.ActorFrame { LoadFont("_arial black 20px")..{ Text="Background logo or video must go here..."; - InitCommand=function(self) - self:CenterX(); - self:y(200); - self:Stroke(color("#000000")); - end; + InitCommand=cmd(CenterX;y,200;Stroke,color("#000000")); }; } \ No newline at end of file diff --git a/Themes/_themekit-piu/BGAnimations/ScreenWithMenuElements background.lua b/Themes/_themekit-piu/BGAnimations/ScreenWithMenuElements background.lua index dac38bc025..2617497a9a 100644 --- a/Themes/_themekit-piu/BGAnimations/ScreenWithMenuElements background.lua +++ b/Themes/_themekit-piu/BGAnimations/ScreenWithMenuElements background.lua @@ -1,11 +1,5 @@ local particles = { - Def.Quad { - InitCommand=function(self) - self:FullScreen(); - self:diffuse(color("#003200")); - self:diffusetopedge(color("#000000")); - end; - } + Def.Quad { InitCommand=cmd(FullScreen;diffuse,color("#003200");diffusetopedge,color("#000000")); } } for i=1,30 do @@ -19,9 +13,7 @@ for i=1,30 do self:diffuse(math.random(0.2,1),math.random(0.2,1),math.random(0.2,1),math.random(0.75,0.95)) end; - ScreenChangedMessageCommand=function(self) - self:playcommand("Init"); - end; + ScreenChangedMessageCommand=cmd(playcommand,"Init"); } end diff --git a/Themes/_themekit-piu/BGAnimations/_frame 3x1.lua b/Themes/_themekit-piu/BGAnimations/_frame 3x1.lua index 05e8c18d02..b18753105a 100644 --- a/Themes/_themekit-piu/BGAnimations/_frame 3x1.lua +++ b/Themes/_themekit-piu/BGAnimations/_frame 3x1.lua @@ -7,27 +7,7 @@ local FullFile = THEME:GetPathB('','_frame files 3x1/'..File ) local Frame = LoadActor( FullFile ) return Def.ActorFrame { - Frame .. { - InitCommand=function(self) - self:setstate(0); - self:pause(); - self:horizalign(right); - self:x(-Width / 2); - end; - }; - Frame .. { - InitCommand=function(self) - self:setstate(1); - self:pause(); - self:zoomtowidth(Width); - end; - }; - Frame .. { - InitCommand=function(self) - self:setstate(2); - self:pause(); - self:horizalign(left); - self:x(Width / 2); - end; - }; + Frame .. { InitCommand=cmd(setstate,0;pause;horizalign,right;x,-Width/2) }; + Frame .. { InitCommand=cmd(setstate,1;pause;zoomtowidth,Width) }; + Frame .. { InitCommand=cmd(setstate,2;pause;horizalign,left;x,Width/2) }; }; diff --git a/Themes/_themekit-piu/Graphics/MusicWheelItem SectionExpanded NormalPart/default.lua b/Themes/_themekit-piu/Graphics/MusicWheelItem SectionExpanded NormalPart/default.lua index 7ab0d4af62..f90b65c56a 100644 --- a/Themes/_themekit-piu/Graphics/MusicWheelItem SectionExpanded NormalPart/default.lua +++ b/Themes/_themekit-piu/Graphics/MusicWheelItem SectionExpanded NormalPart/default.lua @@ -2,6 +2,7 @@ return Def.ActorFrame { Draw.RoundBox(276,212,20,20,color("#323232")); Draw.RoundBox(256,192,10,10)..{ Name="ColorFill"; + --InitCommand=cmd(zoomto,256,192); SetMessageCommand=function(self,params) local color = {1,1,1,1} if PREFSMAN:GetPreference("MusicWheelUsesSections") ~= 'MusicWheelUsesSections_Never' @@ -20,11 +21,7 @@ return Def.ActorFrame { LoadFont("_impact 50px")..{ Name="GroupName"; - InitCommand=function(self) - self:shadowlength(0); - self:Stroke(color("#000000")); - self:maxwidth(210); - end; + InitCommand=cmd(shadowlength,0;Stroke,color("#000000");maxwidth,210); SetMessageCommand=function(self,params) text = params.SongGroup self:settext(text); diff --git a/Themes/_themekit-piu/Graphics/MusicWheelItem Song NormalPart/default.lua b/Themes/_themekit-piu/Graphics/MusicWheelItem Song NormalPart/default.lua index b6dba789d6..0ac252227b 100644 --- a/Themes/_themekit-piu/Graphics/MusicWheelItem Song NormalPart/default.lua +++ b/Themes/_themekit-piu/Graphics/MusicWheelItem Song NormalPart/default.lua @@ -2,9 +2,7 @@ return Def.ActorFrame { Draw.RoundBox(276,212,20,20,color("#323232")); Def.Banner { Name="SongBanner"; - InitCommand=function(self) - self:scaletoclipped(256, 192); - end; + InitCommand=cmd(scaletoclipped,256,192); SetMessageCommand=function(self,params) local path = params.Song:GetBannerPath() if not path then path = THEME:GetPathG("Common","fallback banner") end diff --git a/Themes/_themekit-piu/Graphics/Player judgment/default.lua b/Themes/_themekit-piu/Graphics/Player judgment/default.lua index 9b077b7a9d..e6ac0e3a71 100644 --- a/Themes/_themekit-piu/Graphics/Player judgment/default.lua +++ b/Themes/_themekit-piu/Graphics/Player judgment/default.lua @@ -43,94 +43,23 @@ return Def.ActorFrame { this.combo:visible(false); this.label:visible(false); + --self:runcommandsonleaves(cmd( SetTextureFiltering,false )) end; --judges LoadActor("judge")..{ Name="judgm"; - NormalCommand=function(self) - self:shadowlength(0); - self:diffusealpha(1); - self:zoomx(0.913); - self:zoomy(1.175); - self:decelerate(0.175); - self:zoomx(0.62); - self:zoomy(0.78); - self:accelerate(0.06); - self:zoomx(0.63); - self:zoomy(0.82); - self:sleep(0.04); - self:diffusealpha(0.5); - self:zoomx(0.97); - self:zoomy(0.82); - self:sleep(0.04); - self:zoomx(0.63); - self:zoomy(0.82); - self:decelerate(0.175); - self:zoomx(0.82); - self:zoomy(0.82); - self:diffusealpha(0); - end; + NormalCommand=cmd(shadowlength,0;diffusealpha,1;zoomx,0.913;zoomy,1.175;decelerate,0.175;zoomx,0.62;zoomy,0.78;accelerate,0.06;zoomx,0.63;zoomy,0.82;sleep,0.04;diffusealpha,0.5;zoomx,0.97;zoomy,0.82;sleep,0.04;zoomx,0.63;zoomy,0.82;decelerate,0.175;zoomx,0.82;zoomy,0.82;diffusealpha,0) }; --label LoadActor("label")..{ Name="label"; - NormalCommand=function(self) - self:shadowlength(0); - self:diffusealpha(1); - self:zoomx(1.58); - self:zoomy(1.6); - self:y(100); - self:decelerate(0.175); - self:zoomx(1.09); - self:zoomy(1.1); - self:y(70); - self:accelerate(0.06); - self:zoomx(1.14); - self:zoomy(1.1); - self:y(71); - self:sleep(0.04); - self:diffusealpha(0.5); - self:zoomx(1.66); - self:zoomy(1.1); - self:sleep(0.04); - self:zoomx(1.14); - self:zoomy(1.1); - self:decelerate(0.175); - self:zoomx(1.34); - self:zoomy(1.1); - self:diffusealpha(0); - end; + NormalCommand=cmd(shadowlength,0;diffusealpha,1;zoomx,1.58;zoomy,1.6;y,100;decelerate,0.175;zoomx,1.09;zoomy,1.1;y,70;accelerate,0.06;zoomx,1.14;zoomy,1.1;y,71;sleep,0.04;diffusealpha,0.5;zoomx,1.66;zoomy,1.1;sleep,0.04;zoomx,1.14;zoomy,1.1;decelerate,0.175;zoomx,1.34;zoomy,1.1;diffusealpha,0) }; --combo LoadFont("combo")..{ Name="combo"; - NormalCommand=function(self) - self:shadowlength(0); - self:diffusealpha(1); - self:zoomx(1.58); - self:zoomy(1.6); - self:y(30); - self:decelerate(0.175); - self:zoomx(1.09); - self:zoomy(1.1); - self:y(21); - self:accelerate(0.06); - self:zoomx(1.14); - self:zoomy(1.1); - self:y(22); - self:sleep(0.04); - self:diffusealpha(0.5); - self:zoomx(1.66); - self:zoomy(1.1); - self:sleep(0.04); - self:zoomx(1.14); - self:zoomy(1.1); - self:decelerate(0.175); - self:zoomx(1.34); - self:zoomy(1.1); - self:diffusealpha(0); - end; + NormalCommand=cmd(shadowlength,0;diffusealpha,1;zoomx,1.58;zoomy,1.6;y,30;decelerate,0.175;zoomx,1.09;zoomy,1.1;y,21;accelerate,0.06;zoomx,1.14;zoomy,1.1;y,22;sleep,0.04;diffusealpha,0.5;zoomx,1.66;zoomy,1.1;sleep,0.04;zoomx,1.14;zoomy,1.1;decelerate,0.175;zoomx,1.34;zoomy,1.1;diffusealpha,0) }; --"PERFECT"! diff --git a/Themes/_themekit-piu/Graphics/ScreenMapControllers exit.lua b/Themes/_themekit-piu/Graphics/ScreenMapControllers exit.lua index dfca446230..caa908feda 100644 --- a/Themes/_themekit-piu/Graphics/ScreenMapControllers exit.lua +++ b/Themes/_themekit-piu/Graphics/ScreenMapControllers exit.lua @@ -1,12 +1,6 @@ return LoadFont("Common", "Normal")..{ Text="EXIT"; - InitCommand=function(self) - self:CenterX(); - end; - GainFocusCommand=function(self) - self:diffuse(color("#FF0000")); - end; - LoseFocusCommand=function(self) - self:diffuse(color("#FFFFFF")); - end; + InitCommand=cmd(CenterX); + GainFocusCommand=cmd(diffuse,color("#FF0000")); + LoseFocusCommand=cmd(diffuse,color("#FFFFFF")); } \ No newline at end of file diff --git a/Themes/_themekit-piu/Graphics/ScreenTitleMenu scroll.lua b/Themes/_themekit-piu/Graphics/ScreenTitleMenu scroll.lua index 7697ab6855..af292e0b9d 100644 --- a/Themes/_themekit-piu/Graphics/ScreenTitleMenu scroll.lua +++ b/Themes/_themekit-piu/Graphics/ScreenTitleMenu scroll.lua @@ -6,6 +6,13 @@ return Def.ActorFrame { this.ttf:settext(gc:GetText()); this.ttf:Stroke(color("#000000")); this.ttf:diffuse(color("#ffffff")); + --this.bkg:zoomto(150,40); + --this.bkg:diffuse(color("#c0c0c0")); + --this.bkg:fadeleft(0.2); + --this.bkg:faderight(0.2); end; + --GainFocusCommand=cmd(stoptweening;zoom,1.2); + --LoseFocusCommand=cmd(stoptweening;zoom,1.0); + --Def.Quad { Name="bkg" }; LoadFont("_arial", "black 20px")..{ Name="ttf" }; }; \ No newline at end of file diff --git a/Themes/_themekit-piu/Scripts/02 Draw.lua b/Themes/_themekit-piu/Scripts/02 Draw.lua index c541b53d00..7890cba817 100644 --- a/Themes/_themekit-piu/Scripts/02 Draw.lua +++ b/Themes/_themekit-piu/Scripts/02 Draw.lua @@ -12,9 +12,7 @@ Def.ActorFrame { Draw.RoundBox(410,310,20,20,color(#000000)); Draw.RoundBox(400,300,10,10); Draw.Box(256,64,color("#ffcc66"))..{ - InitCommand=function(self) - self:y(-300); - end; + InitCommand=cmd(y,-300); }; } @@ -193,7 +191,7 @@ Draw = { self:GetChild("BottomLeft"):xy(-w/2+hr/2,h/2-vr/2); self:GetChild("BottomRight"):xy(w/2-hr/2,h/2-vr/2); --coloree :3 - self:runcommandsonleaves(function(self) self:diffuse(c) end); + self:runcommandsonleaves(cmd(diffuse,c)) end; --lol sound effects --wrrr whrr wrrr