update stage
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
local t = LoadActor("ScreenWithMenuElements stage/stage" ) .. {
|
||||||
|
BeginCommand=cmd(playcommand,"Set", { StageToShow = SCREENMAN:GetTopScreen():GetStageStats():GetStage() } );
|
||||||
|
};
|
||||||
|
return t;
|
||||||
@@ -1,16 +1,8 @@
|
|||||||
local stages = { }
|
local t = LoadActor("stage" ) .. {
|
||||||
for _, s in ipairs(Stage) do
|
BeginCommand=cmd(playcommand,"Update");
|
||||||
if GAMESTATE:IsStagePossible(s) then
|
CurrentSongChangedMessageCommand=cmd(playcommand,"Update");
|
||||||
local t = LoadActor("_stage " .. s) .. {
|
UpdateCommand=cmd(playcommand,"Set", { StageToShow = GAMESTATE:GetCurrentStage(); } );
|
||||||
InitCommand = cmd(playcommand,"Update"),
|
};
|
||||||
CurrentSongChangedMessageCommand=cmd(playcommand,"Update"),
|
|
||||||
|
|
||||||
UpdateCommand=cmd(visible, GAMESTATE:GetCurrentStage() == s)
|
return t;
|
||||||
}
|
|
||||||
table.insert( stages, t )
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return Def.ActorFrame {
|
|
||||||
children = stages
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
local stages = Def.ActorFrame {
|
||||||
|
};
|
||||||
|
|
||||||
|
for _, s in ipairs(Stage) do
|
||||||
|
-- if GAMESTATE:IsStagePossible(s) then
|
||||||
|
stages[#stages+1] = LoadActor("_stage " .. s) .. {
|
||||||
|
SetCommand=function(self, params) self:visible( params.StageToShow == s ) end;
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return stages;
|
||||||
Reference in New Issue
Block a user