Fixed SSM StageDisplay to update when the song changes and SG StageDisplay to fetch curStage at the correct time to set its color.

This commit is contained in:
Kyzentun
2014-09-17 03:13:31 -06:00
parent 01185e97bd
commit 1186840ef0
2 changed files with 3 additions and 2 deletions
@@ -1,5 +1,4 @@
local curScreen = Var "LoadingScreen";
local curStage = GAMESTATE:GetCurrentStage();
local curStageIndex = GAMESTATE:GetCurrentStageIndex() + 1;
local playMode = GAMESTATE:GetPlayMode();
@@ -14,6 +13,7 @@ local t = Def.ActorFrame {
CurrentTraiP1ChangedMessageCommand=cmd(playcommand,"Set");
CurrentTraiP2ChangedMessageCommand=cmd(playcommand,"Set");
SetCommand=function(self)
local curStage = GAMESTATE:GetCurrentStage();
if GAMESTATE:IsCourseMode() then
local stats = STATSMAN:GetCurStageStats()
if not stats then
@@ -1,5 +1,4 @@
local curScreen = Var "LoadingScreen";
local curStage = GAMESTATE:GetCurrentStage();
local curStageIndex = GAMESTATE:GetCurrentStageIndex();
local t = Def.ActorFrame {};
@@ -15,7 +14,9 @@ t[#t+1] = Def.ActorFrame {
end
self:playcommand("Set")
end;
CurrentSongChangedMessageCommand= cmd(playcommand,"Set"),
SetCommand=function(self)
local curStage = GAMESTATE:GetCurrentStage();
if GAMESTATE:GetCurrentCourse() then
self:settext( curStageIndex+1 .. " / " .. GAMESTATE:GetCurrentCourse():GetEstimatedNumStages() );
elseif GAMESTATE:IsEventMode() then