From 2d5d45e36544846772b6245e59d2643bb8a147e0 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Tue, 2 Jul 2013 18:22:43 -0400 Subject: [PATCH] The "new" theme is handled. --- Themes/new/BGAnimations/Screen cancel.lua | 19 ++++- Themes/new/BGAnimations/Screen in.lua | 15 +++- Themes/new/BGAnimations/Screen out.lua | 14 +++- .../default.lua | 76 ++++++++++++------- .../new/Graphics/ScreenSelectStyle Cursor.lua | 15 ++-- .../ScreenSelectStyle Icon/default.lua | 54 ++++++++----- .../ScreenSelectStyle Scroll/default.lua | 21 ++--- .../Graphics/ScreenTitleMenu logo/default.lua | 46 +++++++---- .../ScreenWithMenuElements CustomOverlay.lua | 17 +++-- .../ScreenWithMenuElements Footer/default.lua | 15 +++- .../ScreenWithMenuElements Header/default.lua | 15 +++- 11 files changed, 212 insertions(+), 95 deletions(-) diff --git a/Themes/new/BGAnimations/Screen cancel.lua b/Themes/new/BGAnimations/Screen cancel.lua index 414780e3f8..35db99840a 100644 --- a/Themes/new/BGAnimations/Screen cancel.lua +++ b/Themes/new/BGAnimations/Screen cancel.lua @@ -1,15 +1,26 @@ local t = Def.ActorFrame {}; -- t[#t+1] = Def.ActorFrame { - InitCommand=cmd(Center); + InitCommand=function(self) + self:Center(); + end; -- Def.Quad { - InitCommand=cmd(zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;diffuse,Color.Black;diffusealpha,0); - StartTransitioningCommand=cmd(decelerate,0.125;diffusealpha,1); + 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; }; -- Sounds LoadActor(THEME:GetPathS(Var "LoadingScreen","cancel")) .. { - StartTransitioningCommand=cmd(play); + StartTransitioningCommand=function(self) + self:play(); + end; }; }; -- diff --git a/Themes/new/BGAnimations/Screen in.lua b/Themes/new/BGAnimations/Screen in.lua index 669306f845..7470aa900f 100644 --- a/Themes/new/BGAnimations/Screen in.lua +++ b/Themes/new/BGAnimations/Screen in.lua @@ -1,11 +1,20 @@ local t = Def.ActorFrame {}; -- t[#t+1] = Def.ActorFrame { - InitCommand=cmd(Center); + InitCommand=function(self) + self:Center(); + end; -- Def.Quad { - InitCommand=cmd(zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;diffuse,Color.Black;diffusealpha,1); - StartTransitioningCommand=cmd(smooth,0.2;diffusealpha,0); + 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; }; }; -- diff --git a/Themes/new/BGAnimations/Screen out.lua b/Themes/new/BGAnimations/Screen out.lua index 060326e2f0..bbe6976e82 100644 --- a/Themes/new/BGAnimations/Screen out.lua +++ b/Themes/new/BGAnimations/Screen out.lua @@ -1,11 +1,19 @@ local t = Def.ActorFrame {}; -- t[#t+1] = Def.ActorFrame { - InitCommand=cmd(Center); + InitCommand=function(self) + self:Center(); -- Def.Quad { - InitCommand=cmd(zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;diffuse,Color.Black;diffusealpha,0); - StartTransitioningCommand=cmd(decelerate,0.25;diffusealpha,1); + 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; }; }; -- diff --git a/Themes/new/BGAnimations/ScreenWithMenuElements background/default.lua b/Themes/new/BGAnimations/ScreenWithMenuElements background/default.lua index 459cd26b35..7edb0c7b71 100644 --- a/Themes/new/BGAnimations/ScreenWithMenuElements background/default.lua +++ b/Themes/new/BGAnimations/ScreenWithMenuElements background/default.lua @@ -1,40 +1,60 @@ local t = Def.ActorFrame {}; -- Background Color t[#t+1] = Def.ActorFrame { - InitCommand=cmd(Center); - -- - Def.Quad { - InitCommand=cmd(zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;diffuse,color("#005185")); - }; + InitCommand=function(self) + self:Center(); + end; + -- + Def.Quad { + InitCommand=function(self) + self:zoomto(SCREEN_WIDTH, SCREEN_HEIGHT); + self:diffuse(color("#005185")); + end; + }; }; + -- Additive Tint t[#t+1] = Def.ActorFrame { - InitCommand=cmd(Center); - -- - Def.Quad { - InitCommand=cmd(zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;fadetop,1;blend,"BlendMode_Add";diffusealpha,0.2); - } + 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; + } }; + -- Textures Frame t[#t+1] = Def.ActorFrame { - 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; - ); - }; + 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; + }; }; -- diff --git a/Themes/new/Graphics/ScreenSelectStyle Cursor.lua b/Themes/new/Graphics/ScreenSelectStyle Cursor.lua index 2e1f2dc7b7..2adfa51cf1 100644 --- a/Themes/new/Graphics/ScreenSelectStyle Cursor.lua +++ b/Themes/new/Graphics/ScreenSelectStyle Cursor.lua @@ -1,8 +1,11 @@ return Def.ActorFrame { - Def.Quad { - InitCommand=cmd(zoomto,48,24;diffuse,PlayerColor(PLAYER_1)); - }; - LoadFont("Common Normal") .. { - Text="P1"; - }; + Def.Quad { + InitCommand=function(self) + self:zoomto(48, 24); + self:diffuse(PlayerColor(PLAYER_1)); + end; + }; + 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 dcebe5415d..9dd01d7b19 100644 --- a/Themes/new/Graphics/ScreenSelectStyle Icon/default.lua +++ b/Themes/new/Graphics/ScreenSelectStyle Icon/default.lua @@ -1,19 +1,37 @@ -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); - }; -}; +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; + }; +}; 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 f324598564..7682321f49 100644 --- a/Themes/new/Graphics/ScreenSelectStyle Scroll/default.lua +++ b/Themes/new/Graphics/ScreenSelectStyle Scroll/default.lua @@ -1,10 +1,13 @@ -local gc = Var("GameCommand"); --- -local t = Def.ActorFrame {}; --- -t[#t+1] = Def.ActorFrame { - Def.Quad { - InitCommand=cmd(zoomto,96,24;diffuse,Color.White); - }; -}; +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; + }; +}; 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 4c80c37b0d..2756a02d08 100644 --- a/Themes/new/Graphics/ScreenTitleMenu logo/default.lua +++ b/Themes/new/Graphics/ScreenTitleMenu logo/default.lua @@ -1,15 +1,31 @@ -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; +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; diff --git a/Themes/new/Graphics/ScreenWithMenuElements CustomOverlay.lua b/Themes/new/Graphics/ScreenWithMenuElements CustomOverlay.lua index be98b2f699..ec3f9c3788 100644 --- a/Themes/new/Graphics/ScreenWithMenuElements CustomOverlay.lua +++ b/Themes/new/Graphics/ScreenWithMenuElements CustomOverlay.lua @@ -1,6 +1,13 @@ -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); - }; +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; + }; }; \ 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 ec1dd9055d..2c37f9a6f2 100644 --- a/Themes/new/Graphics/ScreenWithMenuElements Footer/default.lua +++ b/Themes/new/Graphics/ScreenWithMenuElements Footer/default.lua @@ -1,10 +1,21 @@ return Def.ActorFrame { -- Default BG Def.Quad { - InitCommand=cmd(vertalign,bottom;zoomto,SCREEN_WIDTH,60;diffuse,Color.Black;diffusealpha,0.65); + InitCommand=function(self) + self:vertalign(bottom); + self:zoomto(SCREEN_WIDTH, 60); + self:diffuse(Color.Black); + self:diffusealpha(0.65); + end; }; -- Highlight Def.Quad { - InitCommand=cmd(vertalign,bottom;zoomto,SCREEN_WIDTH,1;diffuse,Color.Blue;fadeleft,1;y,-58); + InitCommand=function(self) + self:vertalign(bottom); + self:zoomto(SCREEN_WIDTH, 1); + self:diffuse(Color.Blue); + self:fadeleft(1); + self:y(-58); + end; }; }; \ 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 7b743906ee..7cae0f7575 100644 --- a/Themes/new/Graphics/ScreenWithMenuElements Header/default.lua +++ b/Themes/new/Graphics/ScreenWithMenuElements Header/default.lua @@ -1,10 +1,21 @@ return Def.ActorFrame { -- Default BG Def.Quad { - InitCommand=cmd(vertalign,top;zoomto,SCREEN_WIDTH,48;diffuse,Color.Black;diffusealpha,0.65); + InitCommand=function(self) + self:vertalign(top); + self:zoomto(SCREEN_WIDTH, 48); + self:diffuse(Color.Black); + self:diffusealpha(0.65); + end; }; -- Highlight Def.Quad { - InitCommand=cmd(vertalign,top;zoomto,SCREEN_WIDTH,1;diffuse,Color.Blue;faderight,1;y,46); + InitCommand=function(self) + self:vertalign(top); + self:zoomto(SCREEN_WIDTH, 1); + self:diffuse(Color.Blue); + self:faderight(1); + self:y(46); + end; }; }; \ No newline at end of file