From 707789af7e68e769c47fdad24097357f7f4c8d20 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sat, 26 Apr 2008 19:43:08 +0000 Subject: [PATCH] fix high score displays not showing high score number --- .../BGAnimations/ScreenEvaluationStage decorations/default.lua | 2 +- .../Themes/default/Graphics/ScreenEvaluation MachineRecord.lua | 2 +- .../Themes/default/Graphics/ScreenEvaluation ProfileRecord.lua | 2 +- stepmania/src/ScreenEvaluation.cpp | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/stepmania/Themes/default/BGAnimations/ScreenEvaluationStage decorations/default.lua b/stepmania/Themes/default/BGAnimations/ScreenEvaluationStage decorations/default.lua index c2e3b80daf..68d046983c 100644 --- a/stepmania/Themes/default/BGAnimations/ScreenEvaluationStage decorations/default.lua +++ b/stepmania/Themes/default/BGAnimations/ScreenEvaluationStage decorations/default.lua @@ -27,7 +27,7 @@ function ComboGraph( pn ) end -local t = THEME:GetPathB("ScreenWithMenuElements2", "decorations" ); +local t = LoadFallbackB( "decorations" ); t[#t+1] = GraphDisplay(PLAYER_1) .. { InitCommand = cmd(x,SCREEN_CENTER_X-222;y,SCREEN_CENTER_Y-16;draworder,1;); diff --git a/stepmania/Themes/default/Graphics/ScreenEvaluation MachineRecord.lua b/stepmania/Themes/default/Graphics/ScreenEvaluation MachineRecord.lua index 4fc28d6115..8830b1aa03 100644 --- a/stepmania/Themes/default/Graphics/ScreenEvaluation MachineRecord.lua +++ b/stepmania/Themes/default/Graphics/ScreenEvaluation MachineRecord.lua @@ -1 +1 @@ -return LoadFont("common normal") .. { InitCommand=cmd(settext,"Machine Record NN";); \ No newline at end of file +return LoadFont("common normal") .. { InitCommand=cmd(settext,"Machine Record #" .. (Var "MachineHighScoreNumber"); ); \ No newline at end of file diff --git a/stepmania/Themes/default/Graphics/ScreenEvaluation ProfileRecord.lua b/stepmania/Themes/default/Graphics/ScreenEvaluation ProfileRecord.lua index cc9224f81b..e298f1dffc 100644 --- a/stepmania/Themes/default/Graphics/ScreenEvaluation ProfileRecord.lua +++ b/stepmania/Themes/default/Graphics/ScreenEvaluation ProfileRecord.lua @@ -1 +1 @@ -return LoadFont("common normal") .. { InitCommand=cmd(settext,"Personal Record NN";); \ No newline at end of file +return LoadFont("common normal") .. { InitCommand=cmd(settext,"Profile Record #" .. (Var "ProfileHighScoreNumber"); ); \ No newline at end of file diff --git a/stepmania/src/ScreenEvaluation.cpp b/stepmania/src/ScreenEvaluation.cpp index 11f64297a1..234f681660 100644 --- a/stepmania/src/ScreenEvaluation.cpp +++ b/stepmania/src/ScreenEvaluation.cpp @@ -605,6 +605,7 @@ void ScreenEvaluation::Init() { if( m_pStageStats->m_player[p].m_iMachineHighScoreIndex != -1 ) { + LuaThreadVariable var( "MachineHighScoreNumber", LuaReference::Create(m_pStageStats->m_player[p].m_iMachineHighScoreIndex+1) ); m_sprMachineRecord[p].Load( THEME->GetPathG( m_sName, ssprintf("MachineRecord",m_pStageStats->m_player[p].m_iMachineHighScoreIndex+1) ) ); m_sprMachineRecord[p]->SetName( ssprintf("MachineRecordP%d",p+1) ); ActorUtil::LoadAllCommands( *m_sprMachineRecord[p], m_sName ); @@ -613,6 +614,7 @@ void ScreenEvaluation::Init() } if( m_pStageStats->m_player[p].m_iProfileHighScoreIndex != -1 ) { + LuaThreadVariable var( "ProfileHighScoreNumber", LuaReference::Create(m_pStageStats->m_player[p].m_iProfileHighScoreIndex+1) ); m_sprProfileRecord[p].Load( THEME->GetPathG( m_sName, ssprintf("ProfileRecord",m_pStageStats->m_player[p].m_iProfileHighScoreIndex+1) ) ); m_sprProfileRecord[p]->SetName( ssprintf("ProfileRecordP%d",p+1) ); ActorUtil::LoadAllCommands( *m_sprProfileRecord[p], m_sName );