From 4bbc834a8c3bd794f28d7b5fdbebfab72b18c3d5 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Fri, 26 Mar 2010 01:38:07 -0500 Subject: [PATCH] Attempt to fix MenuTimer-related warning dialogs that come up when changing themes (happens when one theme's warning timer starts higher than another, and the other theme doesn't define it). --- src/MenuTimer.cpp | 4 ++++ src/MenuTimer.h | 9 ++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/MenuTimer.cpp b/src/MenuTimer.cpp index c08612dec2..66746f6e7c 100644 --- a/src/MenuTimer.cpp +++ b/src/MenuTimer.cpp @@ -48,6 +48,10 @@ void MenuTimer::Load( RString sMetricsGroup ) WARNING_START.Load(sMetricsGroup,"WarningStart"); WARNING_BEEP_START.Load(sMetricsGroup,"WarningBeepStart"); MAX_STALL_SECONDS.Load(sMetricsGroup,"MaxStallSeconds"); + + if(WARNING_COMMAND) + WARNING_COMMAND->Clear(); + WARNING_COMMAND = new ThemeMetric1D(sMetricsGroup, WARNING_COMMAND_NAME, WARNING_START+1); m_fStallSecondsLeft = MAX_STALL_SECONDS; diff --git a/src/MenuTimer.h b/src/MenuTimer.h index be39f3e770..0fdbdf68aa 100644 --- a/src/MenuTimer.h +++ b/src/MenuTimer.h @@ -22,14 +22,13 @@ public: void Start(); // resume countdown from paused void Pause(); // don't count down void Stop(); // set to "00" and pause - void Disable(); // set to "99" and pause + void Disable(); // set to "99" and pause void Stall(); // pause countdown for a sec - void EnableSilent( bool bSilent ) { m_bSilent = bSilent; } // make timer silent - void EnableStealth( bool bStealth ); // make timer invisible and silent + void EnableSilent( bool bSilent ) { m_bSilent = bSilent; } // make timer silent + void EnableStealth( bool bStealth ); // make timer invisible and silent + - // // Lua - // virtual void PushSelf( lua_State *L ); protected: