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