move StandardDecoration stuff into ActorUtil instead of .lua file
This commit is contained in:
@@ -43,7 +43,7 @@ t[#t+1] = ComboGraph(PLAYER_2) .. {
|
|||||||
InitCommand = cmd(x,SCREEN_CENTER_X+222;y,SCREEN_CENTER_Y+10;draworder,1;);
|
InitCommand = cmd(x,SCREEN_CENTER_X+222;y,SCREEN_CENTER_Y+10;draworder,1;);
|
||||||
};
|
};
|
||||||
|
|
||||||
t[#t+1] = LoadActor( THEME:GetPathB('','_standard decoration required'), "TimingDifficultyFrame", "TimingDifficultyFrame" );
|
t[#t+1] = StandardDecorationFromFile( "TimingDifficultyFrame", "TimingDifficultyFrame" );
|
||||||
t[#t+1] = LoadFont( Var "LoadingScreen", "TimingDifficultyNumber" ) .. {
|
t[#t+1] = LoadFont( Var "LoadingScreen", "TimingDifficultyNumber" ) .. {
|
||||||
InitCommand=function(self) self:name("TimingDifficultyNumber"); self:settext(GetTimingDifficulty()); ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen"); end;
|
InitCommand=function(self) self:name("TimingDifficultyNumber"); self:settext(GetTimingDifficulty()); ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen"); end;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
local t = LoadFallbackB();
|
local t = LoadFallbackB();
|
||||||
|
|
||||||
t[#t+1] = LoadActor( THEME:GetPathB('','_standard decoration required'), "StageFrame", "StageFrame" );
|
t[#t+1] = StandardDecorationFromFile( "StageFrame", "StageFrame" );
|
||||||
|
|
||||||
t[#t+1] = LoadActor("_warning") .. {
|
t[#t+1] = LoadActor("_warning") .. {
|
||||||
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;
|
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;
|
||||||
@@ -12,10 +12,10 @@ t[#t+1] = LoadActor("_warning") .. {
|
|||||||
HideDangerAllMessageCommand=cmd(stoptweening;accelerate,0.3;diffusealpha,0);
|
HideDangerAllMessageCommand=cmd(stoptweening;accelerate,0.3;diffusealpha,0);
|
||||||
};
|
};
|
||||||
|
|
||||||
t[#t+1] = LoadActor( THEME:GetPathB('','_standard decoration required'), "LifeFrame", "LifeFrame" );
|
t[#t+1] = StandardDecorationFromFile( "LifeFrame", "LifeFrame" );
|
||||||
t[#t+1] = LoadActor( THEME:GetPathB('','_standard decoration required'), "ScoreFrame", "ScoreFrame" );
|
t[#t+1] = StandardDecorationFromFile( "ScoreFrame", "ScoreFrame" );
|
||||||
t[#t+1] = LoadActor( THEME:GetPathB('','_standard decoration required'), "LeftFrame", "LeftFrame" );
|
t[#t+1] = StandardDecorationFromFile( "LeftFrame", "LeftFrame" );
|
||||||
t[#t+1] = LoadActor( THEME:GetPathB('','_standard decoration required'), "RightFrame", "RightFrame" );
|
t[#t+1] = StandardDecorationFromFile( "RightFrame", "RightFrame" );
|
||||||
|
|
||||||
|
|
||||||
t[#t+1] = Def.ModIconRow {
|
t[#t+1] = Def.ModIconRow {
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
return Def.ActorFrame {
|
return Def.ActorFrame {
|
||||||
LoadActor( THEME:GetPathB('','_standard decoration required'), "GameLogo", "GameLogo " .. GAMESTATE:GetCurrentGame():GetName() );
|
StandardDecorationFromFile( "GameLogo", "GameLogo " .. GAMESTATE:GetCurrentGame():GetName() );
|
||||||
};
|
};
|
||||||
+8
-8
@@ -1,12 +1,12 @@
|
|||||||
-- This needs to be an ActorFrame because children will want to load the base and merge their own elements into the table.
|
-- This needs to be an ActorFrame because children will want to load the base and merge their own elements into the table.
|
||||||
t = Def.ActorFrame {};
|
t = Def.ActorFrame {};
|
||||||
t[#t+1] = LoadActor( THEME:GetPathB('','_standard decoration required'), "LeftFrame", "LeftFrame" );
|
t[#t+1] = StandardDecorationFromFile( "LeftFrame", "LeftFrame" );
|
||||||
t[#t+1] = LoadActor( THEME:GetPathB('','_standard decoration required'), "RightFrame", "RightFrame" );
|
t[#t+1] = StandardDecorationFromFile( "RightFrame", "RightFrame" );
|
||||||
t[#t+1] = LoadActor( THEME:GetPathB('','_standard decoration required'), "Header", "Header" );
|
t[#t+1] = StandardDecorationFromFile( "Header", "Header" );
|
||||||
t[#t+1] = LoadActor( THEME:GetPathB('','_standard decoration required'), "Footer", "Footer" );
|
t[#t+1] = StandardDecorationFromFile( "Footer", "Footer" );
|
||||||
t[#t+1] = LoadActor( THEME:GetPathB('','_standard decoration optional'), "Help", "Help" );
|
t[#t+1] = StandardDecorationFromFileOptional( "Help", "Help" );
|
||||||
t[#t+1] = LoadActor( THEME:GetPathB('','_standard decoration optional'), "StyleIcon", "StyleIcon" );
|
t[#t+1] = StandardDecorationFromFileOptional( "StyleIcon", "StyleIcon" );
|
||||||
t[#t+1] = LoadActor( THEME:GetPathB('','_standard decoration optional'), "StageFrame", "StageFrame" );
|
t[#t+1] = StandardDecorationFromFileOptional( "StageFrame", "StageFrame" );
|
||||||
t[#t+1] = LoadActor( THEME:GetPathB('','_standard decoration optional'), "StageDisplay", "StageDisplay" );
|
t[#t+1] = StandardDecorationFromFileOptional( "StageDisplay", "StageDisplay" );
|
||||||
return t;
|
return t;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
local MetricsName, FileName = ...;
|
|
||||||
if THEME:GetMetric(Var "LoadingScreen","Show"..MetricsName) then
|
|
||||||
return LoadActor( THEME:GetPathB("","_standard decoration required"), MetricsName, FileName );
|
|
||||||
else
|
|
||||||
return Def.Actor {};
|
|
||||||
end
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
local MetricsName, FileName = ...;
|
|
||||||
local t = LoadActor( THEME:GetPathG(Var "LoadingScreen",FileName) );
|
|
||||||
if type(t) == "table" then
|
|
||||||
t = t .. {
|
|
||||||
InitCommand=function(self) self:name(MetricsName); ActorUtil.LoadAllCommandsAndSetXYAndOnCommand(self,Var "LoadingScreen"); end;
|
|
||||||
};
|
|
||||||
end
|
|
||||||
return t;
|
|
||||||
@@ -171,6 +171,27 @@ function WrapInActorFrame( t )
|
|||||||
return Def.ActorFrame { children = t }
|
return Def.ActorFrame { children = t }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function StandardDecorationFromTable( MetricsName, t )
|
||||||
|
if type(t) == "table" then
|
||||||
|
t = t .. {
|
||||||
|
InitCommand=function(self) self:name(MetricsName); ActorUtil.LoadAllCommandsAndSetXYAndOnCommand(self,Var "LoadingScreen"); end;
|
||||||
|
};
|
||||||
|
end
|
||||||
|
return t;
|
||||||
|
end
|
||||||
|
|
||||||
|
function StandardDecorationFromFile( MetricsName, FileName )
|
||||||
|
local t = LoadActor( THEME:GetPathG(Var "LoadingScreen",FileName) );
|
||||||
|
return StandardDecorationFromTable( MetricsName, t );
|
||||||
|
end
|
||||||
|
|
||||||
|
function StandardDecorationFromFileOptional( MetricsName, FileName )
|
||||||
|
if THEME:GetMetric(Var "LoadingScreen","Show"..MetricsName) then
|
||||||
|
return StandardDecorationFromFile( MetricsName, FileName );
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
-- (c) 2006 Glenn Maynard
|
-- (c) 2006 Glenn Maynard
|
||||||
-- All rights reserved.
|
-- All rights reserved.
|
||||||
--
|
--
|
||||||
|
|||||||
Reference in New Issue
Block a user