better encapsulation
This commit is contained in:
@@ -1081,11 +1081,7 @@ int main(int argc, char* argv[])
|
|||||||
/* Set up the theme and announcer, and switch to the last game type. */
|
/* Set up the theme and announcer, and switch to the last game type. */
|
||||||
ReadGamePrefsFromDisk( true );
|
ReadGamePrefsFromDisk( true );
|
||||||
|
|
||||||
{
|
THEME->LoadPreferencesFromMetrics();
|
||||||
CString sSection = "Preferences";
|
|
||||||
GetCommandlineArgument( "Type", &sSection );
|
|
||||||
THEME->LoadPreferencesFromSection( sSection );
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
{
|
||||||
/* Now that THEME is loaded, load the icon for the current theme into the
|
/* Now that THEME is loaded, load the icon for the current theme into the
|
||||||
|
|||||||
@@ -823,8 +823,17 @@ void ThemeManager::GetMetricsThatBeginWith( const CString &sClassName_, const CS
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThemeManager::LoadPreferencesFromSection( const CString &sClassName )
|
CString ThemeManager::GetPreferencesSection() const
|
||||||
{
|
{
|
||||||
|
CString sSection = "Preferences";
|
||||||
|
GetCommandlineArgument( "Type", &sSection );
|
||||||
|
return sSection;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ThemeManager::LoadPreferencesFromMetrics()
|
||||||
|
{
|
||||||
|
CString sClassName = GetPreferencesSection();
|
||||||
|
|
||||||
set<CString> asNames;
|
set<CString> asNames;
|
||||||
|
|
||||||
GetMetricsThatBeginWith( sClassName, "", asNames );
|
GetMetricsThatBeginWith( sClassName, "", asNames );
|
||||||
|
|||||||
@@ -82,7 +82,8 @@ public:
|
|||||||
void GetMetric( const CString &sClassName, const CString &sValueName, apActorCommands &valueOut );
|
void GetMetric( const CString &sClassName, const CString &sValueName, apActorCommands &valueOut );
|
||||||
|
|
||||||
void GetMetricsThatBeginWith( const CString &sClassName, const CString &sValueName, set<CString> &vsValueNamesOut );
|
void GetMetricsThatBeginWith( const CString &sClassName, const CString &sValueName, set<CString> &vsValueNamesOut );
|
||||||
void LoadPreferencesFromSection( const CString &sClassName );
|
CString GetPreferencesSection() const;
|
||||||
|
void LoadPreferencesFromMetrics();
|
||||||
|
|
||||||
static CString GetBlankGraphicPath();
|
static CString GetBlankGraphicPath();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user