diff --git a/Themes/new/BGAnimations/Screen cancel.lua b/Themes/new/BGAnimations/Screen cancel.lua index 35db99840a..414780e3f8 100644 --- a/Themes/new/BGAnimations/Screen cancel.lua +++ b/Themes/new/BGAnimations/Screen cancel.lua @@ -1,26 +1,15 @@ local t = Def.ActorFrame {}; -- t[#t+1] = Def.ActorFrame { - InitCommand=function(self) - self:Center(); - end; + InitCommand=cmd(Center); -- Def.Quad { - InitCommand=function(self) - self:zoomto(SCREEN_WIDTH, SCREEN_HEIGHT); - self:diffuse(Color.Black); - self:diffusealpha(0); - end; - StartTransitioningCommand=function(self) - self:decelerate(0.125); - self:diffusealpha(1); - end; + InitCommand=cmd(zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;diffuse,Color.Black;diffusealpha,0); + StartTransitioningCommand=cmd(decelerate,0.125;diffusealpha,1); }; -- Sounds LoadActor(THEME:GetPathS(Var "LoadingScreen","cancel")) .. { - StartTransitioningCommand=function(self) - self:play(); - end; + StartTransitioningCommand=cmd(play); }; }; -- diff --git a/Themes/new/BGAnimations/Screen in.lua b/Themes/new/BGAnimations/Screen in.lua index 7470aa900f..669306f845 100644 --- a/Themes/new/BGAnimations/Screen in.lua +++ b/Themes/new/BGAnimations/Screen in.lua @@ -1,20 +1,11 @@ local t = Def.ActorFrame {}; -- t[#t+1] = Def.ActorFrame { - InitCommand=function(self) - self:Center(); - end; + InitCommand=cmd(Center); -- Def.Quad { - InitCommand=function(self) - self:zoomto(SCREEN_WIDTH, SCREEN_HEIGHT); - self:diffuse(Color.Black); - self:diffusealpha(1); - end; - StartTransitioningCommand=function(self) - self:smooth(0.2); - self:diffusealpha(0); - end; + InitCommand=cmd(zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;diffuse,Color.Black;diffusealpha,1); + StartTransitioningCommand=cmd(smooth,0.2;diffusealpha,0); }; }; -- diff --git a/Themes/new/BGAnimations/Screen out.lua b/Themes/new/BGAnimations/Screen out.lua index bbe6976e82..060326e2f0 100644 --- a/Themes/new/BGAnimations/Screen out.lua +++ b/Themes/new/BGAnimations/Screen out.lua @@ -1,19 +1,11 @@ local t = Def.ActorFrame {}; -- t[#t+1] = Def.ActorFrame { - InitCommand=function(self) - self:Center(); + InitCommand=cmd(Center); -- Def.Quad { - InitCommand=function(self) - self:zoomto(SCREEN_WIDTH, SCREEN_HEIGHT); - self:diffuse(Color.Black); - self:diffusealpha(0); - end; - StartTransitioningCommand=function(self) - self:decelerate(0.25); - self:diffusealpha(1); - end; + InitCommand=cmd(zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;diffuse,Color.Black;diffusealpha,0); + StartTransitioningCommand=cmd(decelerate,0.25;diffusealpha,1); }; }; -- diff --git a/Themes/new/BGAnimations/ScreenWithMenuElements background/default.lua b/Themes/new/BGAnimations/ScreenWithMenuElements background/default.lua index 7edb0c7b71..459cd26b35 100644 --- a/Themes/new/BGAnimations/ScreenWithMenuElements background/default.lua +++ b/Themes/new/BGAnimations/ScreenWithMenuElements background/default.lua @@ -1,60 +1,40 @@ local t = Def.ActorFrame {}; -- Background Color t[#t+1] = Def.ActorFrame { - InitCommand=function(self) - self:Center(); - end; - -- - Def.Quad { - InitCommand=function(self) - self:zoomto(SCREEN_WIDTH, SCREEN_HEIGHT); - self:diffuse(color("#005185")); - end; - }; + InitCommand=cmd(Center); + -- + Def.Quad { + InitCommand=cmd(zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;diffuse,color("#005185")); + }; }; - -- Additive Tint t[#t+1] = Def.ActorFrame { - InitCommand=function(self) - self:Center(); - end; - -- - Def.Quad { - InitCommand=function(self) - self:zoomto(SCREEN_WIDTH, SCREEN_HEIGHT); - self:fadetop(1); - self:blend("BlendMode_Add"); - self:diffusealpha(0.2); - end; - } + InitCommand=cmd(Center); + -- + Def.Quad { + InitCommand=cmd(zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;fadetop,1;blend,"BlendMode_Add";diffusealpha,0.2); + } }; - -- Textures Frame t[#t+1] = Def.ActorFrame { - InitCommand=function(self) - self:Center(); - end; - - -- Scanline - LoadActor("_texture scanline") .. { - InitCommand=function(self) - self:zoomto(SCREEN_WIDTH, SCREEN_HEIGHT); - self:customtexturerect(0, 0, SCREEN_WIDTH / 16, SCREEN_HEIGHT / 32); - self:diffuse(Color.Black); - self:diffusealpha(0.25); - end; - }; - - -- Checkerboard - LoadActor("_texture checkerboard") .. { - InitCommand=function(self) - self:zoomto(SCREEN_WIDTH, SCREEN_HEIGHT); - self:customtexturerect(0, 0, SCREEN_WIDTH / 64, SCREEN_HEIGHT / 64); - self:texcoordvelocity(0.5, 0); - self:diffuse(Color.Black); - self:diffusealpha(0.25); - end; - }; + InitCommand=cmd(Center); + -- Scanline + LoadActor("_texture scanline") .. { + InitCommand=cmd(zoomto,SCREEN_WIDTH,SCREEN_HEIGHT; + customtexturerect,0,0,SCREEN_WIDTH/16,SCREEN_HEIGHT/32; + diffuse,Color.Black; + diffusealpha,0.25; + ); + }; + -- Checkerboard + LoadActor("_texture checkerboard") .. { + InitCommand=cmd(zoomto,SCREEN_WIDTH,SCREEN_HEIGHT; + customtexturerect,0,0,SCREEN_WIDTH/64,SCREEN_HEIGHT/64; + texcoordvelocity,0.5,0; + diffuse,Color.Black; + diffusealpha,0.25; + ); + }; }; -- diff --git a/Themes/new/Graphics/ScreenSelectStyle Cursor.lua b/Themes/new/Graphics/ScreenSelectStyle Cursor.lua index 2adfa51cf1..2e1f2dc7b7 100644 --- a/Themes/new/Graphics/ScreenSelectStyle Cursor.lua +++ b/Themes/new/Graphics/ScreenSelectStyle Cursor.lua @@ -1,11 +1,8 @@ return Def.ActorFrame { - Def.Quad { - InitCommand=function(self) - self:zoomto(48, 24); - self:diffuse(PlayerColor(PLAYER_1)); - end; - }; - LoadFont("Common Normal") .. { - Text="P1"; - }; + Def.Quad { + InitCommand=cmd(zoomto,48,24;diffuse,PlayerColor(PLAYER_1)); + }; + LoadFont("Common Normal") .. { + Text="P1"; + }; }; \ No newline at end of file diff --git a/Themes/new/Graphics/ScreenSelectStyle Icon/default.lua b/Themes/new/Graphics/ScreenSelectStyle Icon/default.lua index 9dd01d7b19..dcebe5415d 100644 --- a/Themes/new/Graphics/ScreenSelectStyle Icon/default.lua +++ b/Themes/new/Graphics/ScreenSelectStyle Icon/default.lua @@ -1,37 +1,19 @@ -local gc = Var("GameCommand"); --- -local t = Def.ActorFrame {}; --- -t[#t+1] = Def.ActorFrame { - Def.Quad { - InitCommand=function(self) - self:zoomto(96, 24); - self:diffuse(Color.White); - end; - GainFocusCommand=function(self) - self:diffuseshift(); - self:effectcolor2(Color.White); - self:effectcolor1(Color.Blue); - end; - LoseFocusCommand=function(self) - self:stopeffect(); - end; - DisabledCommand=function(self) - self:stopeffect(); - self:diffuse(color("0.5,0.5,0.5,1")); - end; - EnabledCommand=function(self) - self:stopeffect(); - self:diffuse(Color.White); - end; - }; - -- - LoadFont("Common Normal") .. { - Text=gc:GetText(); - InitCommand=function(self) - self:diffuse(Color.Black); - self:zoom(0.675); - end; - }; -}; +local gc = Var("GameCommand"); +-- +local t = Def.ActorFrame {}; +-- +t[#t+1] = Def.ActorFrame { + Def.Quad { + InitCommand=cmd(zoomto,96,24;diffuse,Color.White); + GainFocusCommand=cmd(diffuseshift;effectcolor2,Color.White;effectcolor1,Color.Blue); + LoseFocusCommand=cmd(stopeffect;); + DisabledCommand=cmd(stopeffect;diffuse,color("0.5,0.5,0.5,1")); + EnabledCommand=cmd(stopeffect;diffuse,Color.White); + }; + -- + LoadFont("Common Normal") .. { + Text=gc:GetText(); + InitCommand=cmd(diffuse,Color.Black;zoom,0.675); + }; +}; return t \ No newline at end of file diff --git a/Themes/new/Graphics/ScreenSelectStyle Scroll/default.lua b/Themes/new/Graphics/ScreenSelectStyle Scroll/default.lua index 7682321f49..f324598564 100644 --- a/Themes/new/Graphics/ScreenSelectStyle Scroll/default.lua +++ b/Themes/new/Graphics/ScreenSelectStyle Scroll/default.lua @@ -1,13 +1,10 @@ -local gc = Var("GameCommand"); --- -local t = Def.ActorFrame {}; --- -t[#t+1] = Def.ActorFrame { - Def.Quad { - InitCommand=function(self) - self:zoomto(96, 24); - self:diffuse(Color.White); - end; - }; -}; +local gc = Var("GameCommand"); +-- +local t = Def.ActorFrame {}; +-- +t[#t+1] = Def.ActorFrame { + Def.Quad { + InitCommand=cmd(zoomto,96,24;diffuse,Color.White); + }; +}; return t \ No newline at end of file diff --git a/Themes/new/Graphics/ScreenTitleMenu logo/default.lua b/Themes/new/Graphics/ScreenTitleMenu logo/default.lua index 2756a02d08..4c80c37b0d 100644 --- a/Themes/new/Graphics/ScreenTitleMenu logo/default.lua +++ b/Themes/new/Graphics/ScreenTitleMenu logo/default.lua @@ -1,31 +1,15 @@ -local t = Def.ActorFrame{ - InitCommand=function(self) - self:fov(70); - end; - LoadActor("_arrow")..{ - InitCommand=function(self) - self:x(225); - end; - OnCommand=function(self) - self:wag(); - self:effectmagnitude(0, 0, 16); - self:effectperiod(2.5); - end; - }; - LoadActor("_text"); - LoadActor("_text")..{ - Name="TextGlow"; - InitCommand=function(self) - self:blend(Blend.Add); - self:diffusealpha(0.05); - end; - OnCommand=function(self) - self:glowshift(); - self:effectperiod(2.5); - self:effectcolor1(color("1,1,1,0.25")); - self:effectcolor2(color("1,1,1,1")); - end; - }; -}; - -return t; +local t = Def.ActorFrame{ + InitCommand=cmd(fov,70); + LoadActor("_arrow")..{ + InitCommand=cmd(x,225;); + OnCommand=cmd(wag;effectmagnitude,0,0,16;effectperiod,2.5;); + }; + LoadActor("_text"); + LoadActor("_text")..{ + Name="TextGlow"; + InitCommand=cmd(blend,Blend.Add;diffusealpha,0.05;); + OnCommand=cmd(glowshift;effectperiod,2.5;effectcolor1,color("1,1,1,0.25");effectcolor2,color("1,1,1,1");); + }; +}; + +return t; diff --git a/Themes/new/Graphics/ScreenWithMenuElements CustomOverlay.lua b/Themes/new/Graphics/ScreenWithMenuElements CustomOverlay.lua index ec3f9c3788..be98b2f699 100644 --- a/Themes/new/Graphics/ScreenWithMenuElements CustomOverlay.lua +++ b/Themes/new/Graphics/ScreenWithMenuElements CustomOverlay.lua @@ -1,13 +1,6 @@ -return Def.ActorFrame { - InitCommand=function(self) - self:x(SCREEN_CENTER_X); - self:y(SCREEN_BOTTOM); - end; - Def.Quad { - InitCommand=function( - self:vertalign(bottom); - self:zoomto(SCREEN_WIDTH, 32); - self:diffuse(Color.Black); - end; - }; +return Def.ActorFrame { + InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_BOTTOM); + Def.Quad { + InitCommand=cmd(vertalign,bottom;zoomto,SCREEN_WIDTH,32;diffuse,Color.Black); + }; }; \ No newline at end of file diff --git a/Themes/new/Graphics/ScreenWithMenuElements Footer/default.lua b/Themes/new/Graphics/ScreenWithMenuElements Footer/default.lua index 2c37f9a6f2..ec1dd9055d 100644 --- a/Themes/new/Graphics/ScreenWithMenuElements Footer/default.lua +++ b/Themes/new/Graphics/ScreenWithMenuElements Footer/default.lua @@ -1,21 +1,10 @@ return Def.ActorFrame { -- Default BG Def.Quad { - InitCommand=function(self) - self:vertalign(bottom); - self:zoomto(SCREEN_WIDTH, 60); - self:diffuse(Color.Black); - self:diffusealpha(0.65); - end; + InitCommand=cmd(vertalign,bottom;zoomto,SCREEN_WIDTH,60;diffuse,Color.Black;diffusealpha,0.65); }; -- Highlight Def.Quad { - InitCommand=function(self) - self:vertalign(bottom); - self:zoomto(SCREEN_WIDTH, 1); - self:diffuse(Color.Blue); - self:fadeleft(1); - self:y(-58); - end; + InitCommand=cmd(vertalign,bottom;zoomto,SCREEN_WIDTH,1;diffuse,Color.Blue;fadeleft,1;y,-58); }; }; \ No newline at end of file diff --git a/Themes/new/Graphics/ScreenWithMenuElements Header/default.lua b/Themes/new/Graphics/ScreenWithMenuElements Header/default.lua index 7cae0f7575..7b743906ee 100644 --- a/Themes/new/Graphics/ScreenWithMenuElements Header/default.lua +++ b/Themes/new/Graphics/ScreenWithMenuElements Header/default.lua @@ -1,21 +1,10 @@ return Def.ActorFrame { -- Default BG Def.Quad { - InitCommand=function(self) - self:vertalign(top); - self:zoomto(SCREEN_WIDTH, 48); - self:diffuse(Color.Black); - self:diffusealpha(0.65); - end; + InitCommand=cmd(vertalign,top;zoomto,SCREEN_WIDTH,48;diffuse,Color.Black;diffusealpha,0.65); }; -- Highlight Def.Quad { - InitCommand=function(self) - self:vertalign(top); - self:zoomto(SCREEN_WIDTH, 1); - self:diffuse(Color.Blue); - self:faderight(1); - self:y(46); - end; + InitCommand=cmd(vertalign,top;zoomto,SCREEN_WIDTH,1;diffuse,Color.Blue;faderight,1;y,46); }; }; \ No newline at end of file