From 1186840ef0f76cf49c987d8de18ecdcea30136d7 Mon Sep 17 00:00:00 2001 From: Kyzentun Date: Wed, 17 Sep 2014 03:13:31 -0600 Subject: [PATCH] Fixed SSM StageDisplay to update when the song changes and SG StageDisplay to fetch curStage at the correct time to set its color. --- Themes/default/Graphics/ScreenGameplay StageDisplay.lua | 2 +- .../default/Graphics/ScreenWithMenuElements StageDisplay.lua | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Themes/default/Graphics/ScreenGameplay StageDisplay.lua b/Themes/default/Graphics/ScreenGameplay StageDisplay.lua index ba89053a62..97b9fc77fa 100644 --- a/Themes/default/Graphics/ScreenGameplay StageDisplay.lua +++ b/Themes/default/Graphics/ScreenGameplay StageDisplay.lua @@ -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 diff --git a/Themes/default/Graphics/ScreenWithMenuElements StageDisplay.lua b/Themes/default/Graphics/ScreenWithMenuElements StageDisplay.lua index 051b482d0a..777e055a14 100644 --- a/Themes/default/Graphics/ScreenWithMenuElements StageDisplay.lua +++ b/Themes/default/Graphics/ScreenWithMenuElements StageDisplay.lua @@ -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