Allow a manually set pref for what courses to display in ScreenRanking.

This commit is contained in:
Sean Burke
2003-09-09 02:54:34 +00:00
parent 0cfcb3974f
commit 3275bfd581
3 changed files with 176 additions and 167 deletions
+4
View File
@@ -162,6 +162,8 @@ PrefsManager::PrefsManager()
m_bThreadedInput = true; m_bThreadedInput = true;
m_sIgnoredMessageWindows = ""; m_sIgnoredMessageWindows = "";
m_sCoursesToShowRanking = "";
ReadGlobalPrefsFromDisk( true ); ReadGlobalPrefsFromDisk( true );
} }
@@ -268,6 +270,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame )
#if defined(WIN32) #if defined(WIN32)
ini.GetValue ( "Options", "LastSeenMemory", m_iLastSeenMemory ); ini.GetValue ( "Options", "LastSeenMemory", m_iLastSeenMemory );
#endif #endif
ini.GetValue ( "Options", "CoursesToShowRanking", m_sCoursesToShowRanking );
ini.GetValueB( "Options", "AntiAliasing", m_bAntiAliasing ); ini.GetValueB( "Options", "AntiAliasing", m_bAntiAliasing );
ini.GetValueF( "Options", "GlobalOffsetSeconds", m_fGlobalOffsetSeconds ); ini.GetValueF( "Options", "GlobalOffsetSeconds", m_fGlobalOffsetSeconds );
ini.GetValueB( "Options", "ForceLogFlush", m_bForceLogFlush ); ini.GetValueB( "Options", "ForceLogFlush", m_bForceLogFlush );
@@ -375,6 +378,7 @@ void PrefsManager::SaveGlobalPrefsToDisk()
#if defined(WIN32) #if defined(WIN32)
ini.SetValue ( "Options", "LastSeenMemory", m_iLastSeenMemory ); ini.SetValue ( "Options", "LastSeenMemory", m_iLastSeenMemory );
#endif #endif
ini.SetValue ( "Options", "CoursesToShowRanking", m_sCoursesToShowRanking );
ini.SetValueB( "Options", "AntiAliasing", m_bAntiAliasing ); ini.SetValueB( "Options", "AntiAliasing", m_bAntiAliasing );
ini.SetValueF( "Options", "GlobalOffsetSeconds", m_fGlobalOffsetSeconds ); ini.SetValueF( "Options", "GlobalOffsetSeconds", m_fGlobalOffsetSeconds );
ini.SetValueB( "Options", "ForceLogFlush", m_bForceLogFlush ); ini.SetValueB( "Options", "ForceLogFlush", m_bForceLogFlush );
+2
View File
@@ -127,6 +127,8 @@ public:
CString m_sIgnoredMessageWindows; CString m_sIgnoredMessageWindows;
CString m_sCoursesToShowRanking;
/* Game-specific prefs: */ /* Game-specific prefs: */
CString m_sDefaultModifiers; CString m_sDefaultModifiers;
+4 -1
View File
@@ -39,9 +39,9 @@
#define TIME_START_Y THEME->GetMetricF("ScreenRanking","TimeStartY") #define TIME_START_Y THEME->GetMetricF("ScreenRanking","TimeStartY")
#define SECONDS_PER_PAGE THEME->GetMetricF("ScreenRanking","SecondsPerPage") #define SECONDS_PER_PAGE THEME->GetMetricF("ScreenRanking","SecondsPerPage")
#define SHOW_CATEGORIES THEME->GetMetricB("ScreenRanking","ShowCategories") #define SHOW_CATEGORIES THEME->GetMetricB("ScreenRanking","ShowCategories")
#define COURSES_TO_SHOW THEME->GetMetric("ScreenRanking","CoursesToShow")
#define NOTES_TYPES_TO_HIDE THEME->GetMetric ("ScreenRanking","NotesTypesToHide") #define NOTES_TYPES_TO_HIDE THEME->GetMetric ("ScreenRanking","NotesTypesToHide")
#define COURSES_TO_SHOW PREFSMAN->m_sCoursesToShowRanking
const ScreenMessage SM_ShowNextPage = (ScreenMessage)(SM_User+67); const ScreenMessage SM_ShowNextPage = (ScreenMessage)(SM_User+67);
const ScreenMessage SM_HidePage = (ScreenMessage)(SM_User+68); const ScreenMessage SM_HidePage = (ScreenMessage)(SM_User+68);
@@ -96,6 +96,9 @@ ScreenRanking::ScreenRanking() : ScreenAttract("ScreenRanking")
m_textTime[i].SetZoom( TEXT_ZOOM ); m_textTime[i].SetZoom( TEXT_ZOOM );
m_textTime[i].SetHorizAlign( Actor::align_right ); m_textTime[i].SetHorizAlign( Actor::align_right );
this->AddChild( &m_textTime[i] ); this->AddChild( &m_textTime[i] );
if( PREFSMAN->m_sCoursesToShowRanking == "" )
m_sCoursesToShowRanking = THEME->GetMetric("ScreenRanking","CoursesToShow");
} }