better encapsulation

This commit is contained in:
Glenn Maynard
2005-10-09 01:36:04 +00:00
parent 0940df4b49
commit 797653e5a4
3 changed files with 13 additions and 7 deletions
+1 -5
View File
@@ -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
+10 -1
View File
@@ -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 );
+2 -1
View File
@@ -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();