diff --git a/stepmania/Themes/default/BGAnimations/ScreenMiniMenuContext underlay.lua b/stepmania/Themes/default/BGAnimations/ScreenMiniMenuContext underlay.lua index 50f6fd46c0..9fefe35acf 100644 --- a/stepmania/Themes/default/BGAnimations/ScreenMiniMenuContext underlay.lua +++ b/stepmania/Themes/default/BGAnimations/ScreenMiniMenuContext underlay.lua @@ -1,4 +1,4 @@ -local children = { +local t = Def.ActorFrame { Def.ActorFrame { OnCommand=function(self) local width=136 @@ -21,30 +21,28 @@ local children = { self:GetChild("right"):zoomtoheight(height+thickness) end; - children = { - Def.Quad { - Name="middle"; - InitCommand=cmd(diffuse,0,0,0,1;shadowlength,6); - OnCommand=cmd(); - }; - Def.Quad { - Name="top"; - InitCommand=cmd(zoomtoheight,3); - }; - Def.Quad { - Name="bottom"; - InitCommand=cmd(zoomtoheight,3;diffuse,0.2,0.2,1,1); - }; - Def.Quad { - Name="left"; - InitCommand=cmd(zoomtowidth,3;diffusebottomedge,0.2,0.2,1,1); - }; - Def.Quad { - Name="right"; - InitCommand=cmd(zoomtowidth,3;diffusebottomedge,0.2,0.2,1,1); - }; + Def.Quad { + Name="middle"; + InitCommand=cmd(diffuse,0,0,0,1;shadowlength,6); + OnCommand=cmd(); + }; + Def.Quad { + Name="top"; + InitCommand=cmd(zoomtoheight,3); + }; + Def.Quad { + Name="bottom"; + InitCommand=cmd(zoomtoheight,3;diffuse,0.2,0.2,1,1); + }; + Def.Quad { + Name="left"; + InitCommand=cmd(zoomtowidth,3;diffusebottomedge,0.2,0.2,1,1); + }; + Def.Quad { + Name="right"; + InitCommand=cmd(zoomtowidth,3;diffusebottomedge,0.2,0.2,1,1); }; }; } -return Def.ActorFrame { children = children }; +return t; diff --git a/stepmania/Themes/default/BGAnimations/_fade out with sound.lua b/stepmania/Themes/default/BGAnimations/_fade out with sound.lua index 65f494e603..0e719ed5f4 100644 --- a/stepmania/Themes/default/BGAnimations/_fade out with sound.lua +++ b/stepmania/Themes/default/BGAnimations/_fade out with sound.lua @@ -1,9 +1,7 @@ local t = Def.ActorFrame { - children = { - LoadActor( THEME:GetPathS("", "_swoosh normal") ) .. { - StartTransitioningCommand=cmd(play); - }; - LoadActor( THEME:GetPathB("", "_fade out normal") ); + LoadActor( THEME:GetPathS("", "_swoosh normal") ) .. { + StartTransitioningCommand=cmd(play); }; + LoadActor( THEME:GetPathB("", "_fade out normal") ); }; return t; diff --git a/stepmania/Themes/default/BGAnimations/_options to options.lua b/stepmania/Themes/default/BGAnimations/_options to options.lua index 8d35148e1b..8b4b232e02 100644 --- a/stepmania/Themes/default/BGAnimations/_options to options.lua +++ b/stepmania/Themes/default/BGAnimations/_options to options.lua @@ -1,9 +1,7 @@ local t = Def.ActorFrame { - children = { - LoadActor( THEME:GetPathS("", "_swoosh normal") ) .. { - StartTransitioningCommand=cmd(play); - }; - Def.Actor { OnCommand=cmd(sleep,0.5); }; + LoadActor( THEME:GetPathS("", "_swoosh normal") ) .. { + StartTransitioningCommand=cmd(play); }; + Def.Actor { OnCommand=cmd(sleep,0.5); }; }; return t; diff --git a/stepmania/Themes/default/BGAnimations/_shared background fade in.lua b/stepmania/Themes/default/BGAnimations/_shared background fade in.lua index 69105e9f80..faca8e44b5 100644 --- a/stepmania/Themes/default/BGAnimations/_shared background fade in.lua +++ b/stepmania/Themes/default/BGAnimations/_shared background fade in.lua @@ -1,8 +1,8 @@ -local children = { - LoadActor( THEME:GetPathB("","_shared background normal") ); - LoadActor( THEME:GetPathB("","_fade in normal") ) .. { - OnCommand=cmd(playcommand,"StartTransitioning"); - }; +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"); }; -return Def.ActorFrame { children=children }; +return t; diff --git a/stepmania/Themes/default/BGAnimations/_shared edit courses.lua b/stepmania/Themes/default/BGAnimations/_shared edit courses.lua index 913284bb02..4b48a048ed 100644 --- a/stepmania/Themes/default/BGAnimations/_shared edit courses.lua +++ b/stepmania/Themes/default/BGAnimations/_shared edit courses.lua @@ -2,32 +2,30 @@ local frame = Def.ActorFrame { OnCommand=cmd(x,SCREEN_CENTER_X+180;y,SCREEN_CENTER_Y);--;addx,SCREEN_WIDTH/2;decelerate,0.5;addx,-SCREEN_WIDTH/2); OffCommand=cmd(accelerate,0.5;addx,SCREEN_WIDTH/2); - children = { - LoadFont("Common", "normal") .. { - OnCommand=cmd(horizalign,left;x,-80;y,-130;zoom,0.65;playcommand,"CurrentCourseChanged"); - CurrentCourseChangedMessageCommand=function(self) - local c = GAMESTATE:GetCurrentCourse() - if c then - self:settext( c:GetDisplayFullTitle() ) - else - self:settext( "" ) - end - end; - }; - LoadFont("Common", "normal") .. { - OnCommand=cmd(horizalign,left;x,-80;y,-100;zoom,0.65;playcommand,"CurrentTrailP1Changed"); - CurrentTrailP1ChangedMessageCommand=function(self) - local t = GAMESTATE:GetCurrentTrail( PLAYER_1 ) - if t then - local st = GAMEMAN:StepsTypeToLocalizedString( t:GetStepsType() ) - local cd = CourseDifficultyToLocalizedString( t:GetDifficulty() ) - self:settext( st .. ", " .. cd ) - else - self:settext( "" ) - end - end; - }; + LoadFont("Common", "normal") .. { + OnCommand=cmd(horizalign,left;x,-80;y,-130;zoom,0.65;playcommand,"CurrentCourseChanged"); + CurrentCourseChangedMessageCommand=function(self) + local c = GAMESTATE:GetCurrentCourse() + if c then + self:settext( c:GetDisplayFullTitle() ) + else + self:settext( "" ) + end + end; + }; + LoadFont("Common", "normal") .. { + OnCommand=cmd(horizalign,left;x,-80;y,-100;zoom,0.65;playcommand,"CurrentTrailP1Changed"); + CurrentTrailP1ChangedMessageCommand=function(self) + local t = GAMESTATE:GetCurrentTrail( PLAYER_1 ) + if t then + local st = GAMEMAN:StepsTypeToLocalizedString( t:GetStepsType() ) + local cd = CourseDifficultyToLocalizedString( t:GetDifficulty() ) + self:settext( st .. ", " .. cd ) + else + self:settext( "" ) + end + end; }; }; -return Def.ActorFrame { children = { frame } }; +return Def.ActorFrame { frame }; diff --git a/stepmania/Themes/default/Graphics/_frame 1d.lua b/stepmania/Themes/default/Graphics/_frame 1d.lua index 79973f4b80..ffd95ec281 100644 --- a/stepmania/Themes/default/Graphics/_frame 1d.lua +++ b/stepmania/Themes/default/Graphics/_frame 1d.lua @@ -28,13 +28,12 @@ local p, a = ... assert( (#p%2) == 1 ); local t = Def.ActorFrame { - children = { } }; local Widths = { } local TextureXPos = 0 for i = 1,#p do - t.children[i] = a .. { + t[i] = a .. { Name = tostring(i); InitCommand = function(self) if i < math.ceil(#p/2) then self:horizalign("HorizAlign_Right"); @@ -52,7 +51,7 @@ for i = 1,#p do }; local Width = p[i]; - t.children[i].Frames = + t[i].Frames = { { -- state 0 { x=TextureXPos, y=0 }, -- top-left