From e329e91602dc2c1d6791b827fdcc21a220aed513 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Thu, 10 Oct 2013 00:11:12 -0500 Subject: [PATCH] Add names to life meter/meter display items I would've added commands but I'm not sure where they get run from (or if they get run at all), so that's a job for later. (Sourced from shakesoda/stepmania.) --- Docs/Changelog_sm5.txt | 6 ++++++ Themes/_fallback/metrics.ini | 6 ++++++ src/CombinedLifeMeterTug.cpp | 6 +++++- src/MeterDisplay.cpp | 4 ++++ 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index 484a8ce12c..68809c912c 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -8,6 +8,12 @@ ________________________________________________________________________________ StepMania current development -------------------------------------------------------------------------------- +2013/10/09 +---------- +* [CombinedLifeMeterTug] Added names and commands to Separator and Frame items. + [SSC] +* [MeterDisplay] Added names to Stream and Tip items. [SSC] + 2013/10/06 ---------- * [ScreenOptions] Allow for the use of per-screen Start sounds instead of a forced diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index 366ac3ce5a..89efb67329 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -377,6 +377,12 @@ CancelAll="" [CombinedLifeMeterTug] # We don't use it. MeterWidth=0.0 +#-----# +SeparatorOnCommand= +SeparatorOffCommand= +#-----# +FrameOnCommand= +FrameOffCommand= [Combo] # System Direction diff --git a/src/CombinedLifeMeterTug.cpp b/src/CombinedLifeMeterTug.cpp index 07b306e74f..520a86a47e 100644 --- a/src/CombinedLifeMeterTug.cpp +++ b/src/CombinedLifeMeterTug.cpp @@ -4,7 +4,7 @@ #include "GameState.h" #include "PrefsManager.h" #include "ThemeMetric.h" - +#include "ActorUtil.h" ThemeMetric METER_WIDTH ("CombinedLifeMeterTug","MeterWidth"); @@ -43,9 +43,13 @@ CombinedLifeMeterTug::CombinedLifeMeterTug() m_Stream[PLAYER_2].SetZoomX( -1 ); m_sprSeparator.Load( THEME->GetPathG("CombinedLifeMeterTug","separator") ); + m_sprSeparator->SetName( "Separator" ); + LOAD_ALL_COMMANDS( m_sprSeparator ); this->AddChild( m_sprSeparator ); m_sprFrame.Load( THEME->GetPathG("CombinedLifeMeterTug","frame") ); + m_sprFrame->SetName( "Frame" ); + LOAD_ALL_COMMANDS( m_sprFrame ); this->AddChild( m_sprFrame ); } diff --git a/src/MeterDisplay.cpp b/src/MeterDisplay.cpp index cd8c2faebb..d58c8aab2e 100644 --- a/src/MeterDisplay.cpp +++ b/src/MeterDisplay.cpp @@ -35,12 +35,16 @@ void MeterDisplay::LoadFromNode( const XNode* pNode ) if( pStream == NULL ) RageException::Throw( "%s: MeterDisplay: missing the \"Stream\" attribute", ActorUtil::GetWhere(pNode).c_str() ); m_sprStream.LoadActorFromNode( pStream, this ); + m_sprStream->SetName( "Stream" ); + //LOAD_ALL_COMMANDS( m_sprStream ); this->AddChild( m_sprStream ); const XNode* pChild = pNode->GetChild( "Tip" ); if( pChild != NULL ) { m_sprTip.LoadActorFromNode( pChild, this ); + m_sprTip->SetName( "Tip" ); + //LOAD_ALL_COMMANDS( m_sprTip ); this->AddChild( m_sprTip ); }