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 = { }
|
||||
for _, s in ipairs(Stage) do
|
||||
if GAMESTATE:IsStagePossible(s) then
|
||||
local t = LoadActor("_stage " .. s) .. {
|
||||
InitCommand = cmd(playcommand,"Update"),
|
||||
CurrentSongChangedMessageCommand=cmd(playcommand,"Update"),
|
||||
local t = LoadActor("stage" ) .. {
|
||||
BeginCommand=cmd(playcommand,"Update");
|
||||
CurrentSongChangedMessageCommand=cmd(playcommand,"Update");
|
||||
UpdateCommand=cmd(playcommand,"Set", { StageToShow = GAMESTATE:GetCurrentStage(); } );
|
||||
};
|
||||
|
||||
UpdateCommand=cmd(visible, GAMESTATE:GetCurrentStage() == s)
|
||||
}
|
||||
table.insert( stages, t )
|
||||
end
|
||||
end
|
||||
return t;
|
||||
|
||||
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