From f8f4453637d4ae7a959f55e7f8c27087bed29680 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sun, 15 May 2011 13:38:41 -0500 Subject: [PATCH] [ScreenGameplay] Removed hardcoded commands for Debug (give up text) and replace them with DebugStartOnCommand, DebugBackOnCommand, and DebugTweenOffCommand. --- Docs/Changelog_sm5.txt | 6 ++++++ Themes/_fallback/metrics.ini | 3 +++ src/ScreenGameplay.cpp | 17 +++-------------- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index daf91cd16f..91fb2ccaf9 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -8,6 +8,12 @@ ________________________________________________________________________________ StepMania 5.0 $NEXT | 20110xyy -------------------------------------------------------------------------------- +2011/05/15 +---------- +* [ScreenGameplay] Removed hardcoded commands for Debug (give up text) and + replace them with DebugStartOnCommand, DebugBackOnCommand, and + DebugTweenOffCommand. [AJ] + 2011/05/14 ---------- * [ModIcon] Added StopWords metric. [AJ] diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index 1b23a2200c..b80fa71588 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -3211,6 +3211,9 @@ SongOptionsOffCommand= DebugX=SCREEN_CENTER_X DebugY=SCREEN_BOTTOM-72 DebugOnCommand=zoom,0.75 +DebugStartOnCommand=stoptweening;diffusealpha,0;linear,1/8;diffusealpha,1 +DebugBackOnCommand=stoptweening;diffusealpha,0;linear,1/8;diffusealpha,1 +DebugTweenOffCommand=stoptweening;linear,1/8;diffusealpha,0 # SongNumberFormat="%d" SongNumberP1X=THEME:GetMetric(Var "LoadingScreen","PlayerP1OnePlayerOneSideX") - 60 diff --git a/src/ScreenGameplay.cpp b/src/ScreenGameplay.cpp index 5ffaa849db..b3dbc5a791 100644 --- a/src/ScreenGameplay.cpp +++ b/src/ScreenGameplay.cpp @@ -2156,11 +2156,7 @@ void ScreenGameplay::Input( const InputEventPlus &input ) else if( input.type==IET_FIRST_PRESS && m_GiveUpTimer.IsZero() ) { m_textDebug.SetText( GIVE_UP_START_TEXT ); - // todo: un-hardcode commands and move to metrics -aj - m_textDebug.StopTweening(); - m_textDebug.SetDiffuse( RageColor(1,1,1,0) ); - m_textDebug.BeginTweening( 1/8.f ); - m_textDebug.SetDiffuse( RageColor(1,1,1,1) ); + m_textDebug.PlayCommand( "StartOn" ); m_GiveUpTimer.Touch(); // start the timer } @@ -2187,18 +2183,11 @@ void ScreenGameplay::Input( const InputEventPlus &input ) else if( PREFSMAN->m_bDelayedBack && input.type==IET_FIRST_PRESS ) { m_textDebug.SetText( GIVE_UP_BACK_TEXT ); - // todo: un-hardcode commands and move to metrics -aj - m_textDebug.StopTweening(); - m_textDebug.SetDiffuse( RageColor(1,1,1,0) ); - m_textDebug.BeginTweening( 1/8.f ); - m_textDebug.SetDiffuse( RageColor(1,1,1,1) ); + m_textDebug.PlayCommand( "BackOn" ); } else if( PREFSMAN->m_bDelayedBack && input.type==IET_RELEASE ) { - // todo: un-hardcode commands and move to metrics -aj - m_textDebug.StopTweening(); - m_textDebug.BeginTweening( 1/8.f ); - m_textDebug.SetDiffuse( RageColor(1,1,1,0) ); + m_textDebug.PlayCommand( "TweenOff" ); } return;