From f57abda0bc0ce672cf1eb3d8dc56f13e8e2ae381 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Thu, 18 Jul 2013 17:42:11 -0400 Subject: [PATCH] Revert "Portkit for SM4 handled." This reverts commit f373dd9add61b92e59ca7f7fc7f4f790af31950e. --- .../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, 31 insertions(+), 184 deletions(-) diff --git a/Themes/_portKit-sm4/BGAnimations/_fade in normal.lua b/Themes/_portKit-sm4/BGAnimations/_fade in normal.lua index 321dd4f351..bb49e9f421 100644 --- a/Themes/_portKit-sm4/BGAnimations/_fade in normal.lua +++ b/Themes/_portKit-sm4/BGAnimations/_fade in normal.lua @@ -1,11 +1,4 @@ return Def.Quad { - 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; + InitCommand=cmd(diffuse,color("#000000");stretchto,SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM); + StartTransitioningCommand=cmd(diffusealpha,1;linear,0.3;diffusealpha,0); }; diff --git a/Themes/_portKit-sm4/BGAnimations/_fade out normal.lua b/Themes/_portKit-sm4/BGAnimations/_fade out normal.lua index 961a40a70a..97cf2139a7 100644 --- a/Themes/_portKit-sm4/BGAnimations/_fade out normal.lua +++ b/Themes/_portKit-sm4/BGAnimations/_fade out normal.lua @@ -1,12 +1,5 @@ local t = Def.Quad { - 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; + InitCommand=cmd(diffuse,color("#000000");stretchto,SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM); + StartTransitioningCommand=cmd(diffusealpha,0;linear,0.3;diffusealpha,1); }; return t; diff --git a/Themes/_portKit-sm4/BGAnimations/_frame 3x1/default.lua b/Themes/_portKit-sm4/BGAnimations/_frame 3x1/default.lua index 1df7063fd4..9673efba02 100644 --- a/Themes/_portKit-sm4/BGAnimations/_frame 3x1/default.lua +++ b/Themes/_portKit-sm4/BGAnimations/_frame 3x1/default.lua @@ -6,27 +6,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/_portKit-sm4/BGAnimations/_frame 3x3/default.lua b/Themes/_portKit-sm4/BGAnimations/_frame 3x3/default.lua index 665a4306d4..be645fc354 100644 --- a/Themes/_portKit-sm4/BGAnimations/_frame 3x3/default.lua +++ b/Themes/_portKit-sm4/BGAnimations/_frame 3x3/default.lua @@ -6,90 +6,13 @@ assert( Height ); local FullFile = THEME:GetPathB('','_frame files 3x3/'..File ) local Frame = LoadActor( FullFile ) return Def.ActorFrame { - 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; - }; + 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) }; }; diff --git a/Themes/_portKit-sm4/BGAnimations/_menu in.lua b/Themes/_portKit-sm4/BGAnimations/_menu in.lua index aa3fee648f..5688d29bed 100644 --- a/Themes/_portKit-sm4/BGAnimations/_menu in.lua +++ b/Themes/_portKit-sm4/BGAnimations/_menu in.lua @@ -1,16 +1,8 @@ return Def.ActorFrame { LoadActor( THEME:GetPathS("", "_swoosh normal") ) .. { - + --StartTransitioningCommand=cmd(play); }; LoadActor("_moveon") .. { - 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; + OnCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;diffusealpha,1;linear,0.2;diffusealpha,0;zoomx,1;zoomy,0;); }; }; diff --git a/Themes/_portKit-sm4/BGAnimations/_menu out.lua b/Themes/_portKit-sm4/BGAnimations/_menu out.lua index 16dec33711..b3c5e7ce9c 100644 --- a/Themes/_portKit-sm4/BGAnimations/_menu out.lua +++ b/Themes/_portKit-sm4/BGAnimations/_menu out.lua @@ -1,18 +1,8 @@ return Def.ActorFrame { LoadActor( THEME:GetPathS("", "_swoosh normal") ) .. { - + --StartTransitioningCommand=cmd(play); }; LoadActor("_moveon") .. { - 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; + 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); }; }; diff --git a/Themes/_portKit-sm4/BGAnimations/_shared background fade in.lua b/Themes/_portKit-sm4/BGAnimations/_shared background fade in.lua index 5378280ce1..faca8e44b5 100644 --- a/Themes/_portKit-sm4/BGAnimations/_shared background fade in.lua +++ b/Themes/_portKit-sm4/BGAnimations/_shared background fade in.lua @@ -2,9 +2,7 @@ local t = Def.ActorFrame { }; t[#t+1] = LoadActor( THEME:GetPathB("","_shared background normal") ); t[#t+1] = LoadActor( THEME:GetPathB("","_fade in normal") ) .. { - OnCommand=function(self) - self:playcommand("StartTransitioning"); - end; + OnCommand=cmd(playcommand,"StartTransitioning"); }; return t; diff --git a/Themes/_portKit-sm4/Graphics/ScreenMapControllers exit.lua b/Themes/_portKit-sm4/Graphics/ScreenMapControllers exit.lua index e1e1cffaf0..e922b168d6 100644 --- a/Themes/_portKit-sm4/Graphics/ScreenMapControllers exit.lua +++ b/Themes/_portKit-sm4/Graphics/ScreenMapControllers exit.lua @@ -1,32 +1,10 @@ -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; -}; +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); +};