From 6d0e884b95c254fabfd4f16865f11b8a5e80943d Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Thu, 31 May 2012 03:20:24 -0500 Subject: [PATCH] [PaneDisplay] Added NullCountString metric. --- Docs/Changelog_sm5.txt | 6 +++++- Themes/_fallback/metrics.ini | 3 +++ src/PaneDisplay.cpp | 11 ++++------- src/PaneDisplay.h | 1 + 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index 3d779c3f22..a203aee8b5 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -8,9 +8,13 @@ ________________________________________________________________________________ StepMania 5.0 ???? ?? | 20120??? -------------------------------------------------------------------------------- +2012/05/31 +---------- +* [PaneDisplay] Added NullCountString metric. [AJ] + 2012/05/27 ---------- -* [MusicWheel] Added EmptyColor metric. +* [MusicWheel] Added EmptyColor metric. [AJ] * [PlayerState] Enabled GetPlayerController Lua binding. 2012/05/21 diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index 24b13ea327..4eaa7e11d3 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -4503,3 +4503,6 @@ TimerStealth=true ForceTimer=true TimerMetricsGroup="MenuTimerNoSound" TimerOnCommand=visible,false + +[PaneDisplay] +NullCountString="" \ No newline at end of file diff --git a/src/PaneDisplay.cpp b/src/PaneDisplay.cpp index 4761dd1b8e..2fa4b047f5 100644 --- a/src/PaneDisplay.cpp +++ b/src/PaneDisplay.cpp @@ -66,6 +66,7 @@ void PaneDisplay::Load( const RString &sMetricsGroup, PlayerNumber pn ) EMPTY_MACHINE_HIGH_SCORE_NAME.Load( sMetricsGroup, "EmptyMachineHighScoreName" ); NOT_AVAILABLE.Load( sMetricsGroup, "NotAvailable" ); COUNT_FORMAT.Load( sMetricsGroup, "CountFormat" ); + NULL_COUNT_STRING.Load( sMetricsGroup, "NullCountString" ); FOREACH_ENUM( PaneCategory, pc ) { @@ -114,8 +115,9 @@ void PaneDisplay::LoadFromNode( const XNode *pNode ) void PaneDisplay::SetContent( PaneCategory c ) { - RString str = ""; // fill this in - float val = 0; // fill this in + // these get filled in later: + RString str = NULL_COUNT_STRING; + float val = 0; const Song *pSong = GAMESTATE->m_pCurSong; const Steps *pSteps = GAMESTATE->m_pCurSteps[m_PlayerNumber]; @@ -124,11 +126,6 @@ void PaneDisplay::SetContent( PaneCategory c ) const Profile *pProfile = PROFILEMAN->IsPersistentProfile(m_PlayerNumber) ? PROFILEMAN->GetProfile(m_PlayerNumber) : NULL; bool bIsPlayerEdit = pSteps && pSteps->IsAPlayerEdit(); - // Note: In SM3.9, all values would get set to a "?" if the current - // selection (pSong/pCourse, in this case) is invalid. - // We use fallback values (everything is blank). - // TODO: add a theme option to use a similar behavior. -aj - if(GAMESTATE->IsCourseMode() && !pTrail) { if( (g_Contents[c].req&NEED_PROFILE) ) diff --git a/src/PaneDisplay.h b/src/PaneDisplay.h index 1ebdb0bf83..955b755625 100644 --- a/src/PaneDisplay.h +++ b/src/PaneDisplay.h @@ -58,6 +58,7 @@ private: LocalizedString EMPTY_MACHINE_HIGH_SCORE_NAME; LocalizedString NOT_AVAILABLE; ThemeMetric COUNT_FORMAT; + ThemeMetric NULL_COUNT_STRING; }; #endif