From f373dd9add61b92e59ca7f7fc7f4f790af31950e Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Tue, 2 Jul 2013 17:48:24 -0400 Subject: [PATCH] Portkit for SM4 handled. --- .../BGAnimations/_fade in normal.lua | 11 ++- .../BGAnimations/_fade out normal.lua | 11 ++- .../BGAnimations/_frame 3x1/default.lua | 26 ++++- .../BGAnimations/_frame 3x3/default.lua | 95 +++++++++++++++++-- Themes/_portKit-sm4/BGAnimations/_menu in.lua | 12 ++- .../_portKit-sm4/BGAnimations/_menu out.lua | 14 ++- .../_shared background fade in.lua | 4 +- .../Graphics/ScreenMapControllers exit.lua | 42 ++++++-- 8 files changed, 184 insertions(+), 31 deletions(-) diff --git a/Themes/_portKit-sm4/BGAnimations/_fade in normal.lua b/Themes/_portKit-sm4/BGAnimations/_fade in normal.lua index bb49e9f421..321dd4f351 100644 --- a/Themes/_portKit-sm4/BGAnimations/_fade in normal.lua +++ b/Themes/_portKit-sm4/BGAnimations/_fade in normal.lua @@ -1,4 +1,11 @@ return Def.Quad { - InitCommand=cmd(diffuse,color("#000000");stretchto,SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM); - StartTransitioningCommand=cmd(diffusealpha,1;linear,0.3;diffusealpha,0); + InitCommand=function(self) + self:diffuse(color("#000000")); + self:stretchto(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM); + end; + StartTransitioningCommand=function(self) + self:diffusealpha(1); + self:linear(0.3); + self:diffusealpha(0); + end; }; diff --git a/Themes/_portKit-sm4/BGAnimations/_fade out normal.lua b/Themes/_portKit-sm4/BGAnimations/_fade out normal.lua index 97cf2139a7..961a40a70a 100644 --- a/Themes/_portKit-sm4/BGAnimations/_fade out normal.lua +++ b/Themes/_portKit-sm4/BGAnimations/_fade out normal.lua @@ -1,5 +1,12 @@ local t = Def.Quad { - InitCommand=cmd(diffuse,color("#000000");stretchto,SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM); - StartTransitioningCommand=cmd(diffusealpha,0;linear,0.3;diffusealpha,1); + InitCommand=function(self) + self:diffuse(color("#000000")); + self:stretchto(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM); + end; + StartTransitioningCommand=function(self) + self:diffusealpha(0); + self:linear(0.3); + self:diffusealpha(1); + end; }; return t; diff --git a/Themes/_portKit-sm4/BGAnimations/_frame 3x1/default.lua b/Themes/_portKit-sm4/BGAnimations/_frame 3x1/default.lua index 9673efba02..1df7063fd4 100644 --- a/Themes/_portKit-sm4/BGAnimations/_frame 3x1/default.lua +++ b/Themes/_portKit-sm4/BGAnimations/_frame 3x1/default.lua @@ -6,7 +6,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/_portKit-sm4/BGAnimations/_frame 3x3/default.lua b/Themes/_portKit-sm4/BGAnimations/_frame 3x3/default.lua index be645fc354..665a4306d4 100644 --- a/Themes/_portKit-sm4/BGAnimations/_frame 3x3/default.lua +++ b/Themes/_portKit-sm4/BGAnimations/_frame 3x3/default.lua @@ -6,13 +6,90 @@ assert( Height ); local FullFile = THEME:GetPathB('','_frame files 3x3/'..File ) local Frame = LoadActor( FullFile ) return Def.ActorFrame { - Frame .. { InitCommand=cmd(setstate,0;pause;horizalign,right;vertalign,bottom;x,-Width/2;y,-Height/2) }; - Frame .. { InitCommand=cmd(setstate,1;pause;zoomtowidth,Width;vertalign,bottom;zoomtowidth,Width;y,-Height/2) }; - Frame .. { InitCommand=cmd(setstate,2;pause;horizalign,left;vertalign,bottom;x,Width/2;y,-Height/2) }; - Frame .. { InitCommand=cmd(setstate,3;pause;horizalign,right;x,-Width/2;zoomtoheight,Height) }; - Frame .. { InitCommand=cmd(setstate,4;pause;zoomtowidth,Width;zoomtoheight,Height) }; - Frame .. { InitCommand=cmd(setstate,5;pause;horizalign,left;x,Width/2;zoomtoheight,Height) }; - Frame .. { InitCommand=cmd(setstate,6;pause;horizalign,right;vertalign,top;x,-Width/2;y,Height/2) }; - Frame .. { InitCommand=cmd(setstate,7;pause;zoomtowidth,Width;vertalign,top;zoomtowidth,Width;y,Height/2) }; - Frame .. { InitCommand=cmd(setstate,8;pause;horizalign,left;vertalign,top;x,Width/2;y,Height/2) }; + Frame .. { + InitCommand=function(self) + self:setstate(0); + self:pause(); + self:horizalign(right); + self:vertalign(bottom); + self:x(-Width / 2); + self:y(-Height / 2); + end; + }; + Frame .. { + InitCommand=function(self) + self:setstate(1); + self:pause(); + self:zoomtowidth(Width); + self:vertalign(bottom); + self:zoomtowidth(Width); + self:y(-Height / 2); + end; + }; + Frame .. { + InitCommand=function(self) + self:setstate(2); + self:pause(); + self:horizalign(left); + self:vertalign(bottom); + self:x(Width / 2); + self:y(-Height / 2); + end; + }; + Frame .. { + InitCommand=function(self) + self:setstate(3); + self:pause(); + self:horizalign(right); + self:x(-Width / 2); + self:zoomtoheight(Height); + end; + }; + Frame .. { + InitCommand=function(self) + self:setstate(4); + self:pause(); + self:zoomtowidth(Width); + self:zoomtoheight(Height); + end; + }; + Frame .. { + InitCommand=function(self) + self:setstate(5); + self:pause(); + self:horizalign(left); + self:x(Width / 2); + self:(zoomtoheight(Height); + end; + }; + Frame .. { + InitCommand=function(self) + self:setstate(6); + self:pause(); + self:horizalign(right); + self:vertalign(top); + self:x(-Width / 2); + self:y(Height / 2); + end; + }; + Frame .. { + InitCommand=function(self) + self:setstate(7); + self:pause(); + self:zoomtowidth(Width); + self:vertalign(top); + self:zoomtowidth(Width); + self:y(Height / 2); + end; + }; + Frame .. { + InitCommand=function(self) + self:setstate(8); + self:pause(); + self:horizalign(left); + self:vertalign(top); + self:x(Width / 2); + self:y(Height / 2); + end; + }; }; diff --git a/Themes/_portKit-sm4/BGAnimations/_menu in.lua b/Themes/_portKit-sm4/BGAnimations/_menu in.lua index 5688d29bed..aa3fee648f 100644 --- a/Themes/_portKit-sm4/BGAnimations/_menu in.lua +++ b/Themes/_portKit-sm4/BGAnimations/_menu in.lua @@ -1,8 +1,16 @@ return Def.ActorFrame { LoadActor( THEME:GetPathS("", "_swoosh normal") ) .. { - --StartTransitioningCommand=cmd(play); + }; LoadActor("_moveon") .. { - OnCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;diffusealpha,1;linear,0.2;diffusealpha,0;zoomx,1;zoomy,0;); + OnCommand=function(self) + self:x(SCREEN_CENTER_X); + self:y(SCREEN_CENTER_Y); + self:diffusealpha(1); + self:linear(0.2); + self:diffusealpha(0); + self:zoomx(1); + self:zoomy(0); + end; }; }; diff --git a/Themes/_portKit-sm4/BGAnimations/_menu out.lua b/Themes/_portKit-sm4/BGAnimations/_menu out.lua index b3c5e7ce9c..16dec33711 100644 --- a/Themes/_portKit-sm4/BGAnimations/_menu out.lua +++ b/Themes/_portKit-sm4/BGAnimations/_menu out.lua @@ -1,8 +1,18 @@ return Def.ActorFrame { LoadActor( THEME:GetPathS("", "_swoosh normal") ) .. { - --StartTransitioningCommand=cmd(play); + }; LoadActor("_moveon") .. { - OnCommand=cmd(hibernate,0.1;x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;zoomx,1;zoomy,0;diffusealpha,0;linear,0.35;diffusealpha,1;zoom,1); + OnCommand=function(self) + self:hibernate(0.1); + self:x(SCREEN_CENTER_X); + self:y(SCREEN_CENTER_Y); + self:zoomx(1); + self:zoomy(0); + self:diffusealpha(0); + self:linear(0.35); + self:diffusealpha(1); + self:zoom(1); + end; }; }; diff --git a/Themes/_portKit-sm4/BGAnimations/_shared background fade in.lua b/Themes/_portKit-sm4/BGAnimations/_shared background fade in.lua index faca8e44b5..5378280ce1 100644 --- a/Themes/_portKit-sm4/BGAnimations/_shared background fade in.lua +++ b/Themes/_portKit-sm4/BGAnimations/_shared background fade in.lua @@ -2,7 +2,9 @@ local t = Def.ActorFrame { }; t[#t+1] = LoadActor( THEME:GetPathB("","_shared background normal") ); t[#t+1] = LoadActor( THEME:GetPathB("","_fade in normal") ) .. { - OnCommand=cmd(playcommand,"StartTransitioning"); + OnCommand=function(self) + self:playcommand("StartTransitioning"); + end; }; return t; diff --git a/Themes/_portKit-sm4/Graphics/ScreenMapControllers exit.lua b/Themes/_portKit-sm4/Graphics/ScreenMapControllers exit.lua index e922b168d6..e1e1cffaf0 100644 --- a/Themes/_portKit-sm4/Graphics/ScreenMapControllers exit.lua +++ b/Themes/_portKit-sm4/Graphics/ScreenMapControllers exit.lua @@ -1,10 +1,32 @@ -return LoadFont("Common Normal") .. { - Text="Exit"; - InitCommand=cmd(x,SCREEN_CENTER_X;zoom,0.75;shadowlength,0;diffuse,color("#808080")); - OnCommand=cmd(diffusealpha,0;decelerate,0.5;diffusealpha,1); - OffCommand=cmd(stoptweening;accelerate,0.3;diffusealpha,0;queuecommand,"Hide"); - HideCommand=cmd(visible,false); - - GainFocusCommand=cmd(diffuseshift;effectcolor2,color("#808080");effectcolor1,color("#FFFFFF")); - LoseFocusCommand=cmd(stopeffect); -}; +return LoadFont("Common Normal") .. { + Text="Exit"; + InitCommand=function(self) + self:x(SCREEN_CENTER_X); + self:zoom(0.75); + self:shadowlength(0); + self:diffuse(color("#808080")); + end; + OnCommand=function(self) + self:diffusealpha(0); + self:decelerate(0.5); + self:diffusealpha(1); + end; + OffCommand=function(self) + self:stoptweening(); + self:accelerate(0.3); + self:diffusealpha(0); + self:queuecommand("Hide"); + end; + HideCommand=function(self) + self:visible(false); + end; + + GainFocusCommand=function(self) + self:diffuseshift(); + self:effectcolor2(color("#808080")); + self:effectcolor1(color("#FFFFFF")); + end; + LoseFocusCommand=function(self) + self:stopeffect(); + end; +};