diff --git a/stepmania/src/LocalizedString.cpp b/stepmania/src/LocalizedString.cpp index de617f59dd..9cd0d849cc 100644 --- a/stepmania/src/LocalizedString.cpp +++ b/stepmania/src/LocalizedString.cpp @@ -32,12 +32,15 @@ RString LocalizedString::LocalizeString( const RString &sSection, const RString LocalizedString::LocalizedString() { g_Subscribers.Subscribe( this ); + m_bValueLoaded = false; } LocalizedString::LocalizedString( const RString &sSection, const RString &sName ) { - Load( sSection, sName ); g_Subscribers.Subscribe( this ); + m_bValueLoaded = false; + + Load( sSection, sName ); Refresh(); } @@ -70,11 +73,12 @@ const RString &LocalizedString::GetValue() const void LocalizedString::Refresh() { m_sValue = LocalizeString( m_sSection, m_sName ); + m_bValueLoaded = true; } bool LocalizedString::IsLoaded() const { - return !m_sSection.empty() && !m_sName.empty(); + return m_bValueLoaded; } LuaFunction( LocalizeString, LocalizedString::LocalizeString( SArg(1), SArg(2) ) ) diff --git a/stepmania/src/LocalizedString.h b/stepmania/src/LocalizedString.h index b6e53ed4d8..291b035c30 100644 --- a/stepmania/src/LocalizedString.h +++ b/stepmania/src/LocalizedString.h @@ -23,6 +23,7 @@ private: RString m_sSection; RString m_sName; RString m_sValue; + bool m_bValueLoaded; }; #endif