From e9e7d787fc4f64579f475fa1b850a0224b8b7010 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sun, 13 Apr 2003 02:34:14 +0000 Subject: [PATCH] On ScreenRanking, color text based on NotesType --- stepmania/Themes/default/metrics.ini | 5 ++++- stepmania/src/ScreenRanking.cpp | 16 +++++++++------- stepmania/src/ScreenRanking.h | 1 + 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index a3ac2ca8c0..f9958b9b98 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -1196,8 +1196,11 @@ TimeStartX=560 TimeStartY=140 SecondsPerPage=5 ShowCategories=1 -CoursesToShow=Courses/NaokiStandard.crs,Courses/ParanoiaBrothers.crs +CoursesToShow=Courses/DDRMAX/NaokiStandard.crs,Courses/DDRMAX/ParanoiaBrothers.crs,Courses/Samples/PlayersBest1-4.crs NotesTypesToHide=dance-couple,dance-solo +TextColor1=0.6,0.6,1,1 +TextColor2=1,0.3,0.3,1 +TextColor3=0.3,1,0.3,1 [ScreenSoundOptions] HelpText=&UP; &DOWN; to change line &LEFT; &RIGHT; to select between options::START to accept changes BACK to discard changes diff --git a/stepmania/src/ScreenRanking.cpp b/stepmania/src/ScreenRanking.cpp index ff0cb8c255..0bb9a0b957 100644 --- a/stepmania/src/ScreenRanking.cpp +++ b/stepmania/src/ScreenRanking.cpp @@ -26,7 +26,7 @@ #define BULLETS_START_X THEME->GetMetricF("ScreenRanking","BulletsStartX") #define BULLETS_START_Y THEME->GetMetricF("ScreenRanking","BulletsStartY") #define TEXT_ZOOM THEME->GetMetricF("ScreenRanking","TextZoom") -#define TEXT_COLOR THEME->GetMetricC("ScreenRanking","TextColor") +#define TEXT_COLOR( i ) THEME->GetMetricC("ScreenRanking",ssprintf("TextColor%d",i+1)) #define NAMES_START_X THEME->GetMetricF("ScreenRanking","NamesStartX") #define NAMES_START_Y THEME->GetMetricF("ScreenRanking","NamesStartY") #define SCORES_START_X THEME->GetMetricF("ScreenRanking","ScoresStartX") @@ -38,7 +38,7 @@ #define SECONDS_PER_PAGE THEME->GetMetricF("ScreenRanking","SecondsPerPage") #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") const ScreenMessage SM_ShowNextPage = (ScreenMessage)(SM_User+67); @@ -125,6 +125,7 @@ ScreenRanking::ScreenRanking() : ScreenAttract("ScreenRanking") { PageToShow pts; pts.type = PageToShow::TYPE_CATEGORY; + pts.colorIndex = i; pts.category = (RankingCategory)c; pts.nt = aNotesTypesToShow[i]; m_vPagesToShow.push_back( pts ); @@ -141,6 +142,7 @@ ScreenRanking::ScreenRanking() : ScreenAttract("ScreenRanking") { PageToShow pts; pts.type = PageToShow::TYPE_COURSE; + pts.colorIndex = i; pts.nt = aNotesTypesToShow[i]; pts.pCourse = SONGMAN->GetCourseFromPath( asCoursePaths[c] ); if( pts.pCourse ) @@ -206,8 +208,8 @@ void ScreenRanking::SetPage( PageToShow pts ) m_textScores[l].SetText( ssprintf("%09.0f",fScore) ); m_textPoints[l].SetText( "" ); m_textTime[l].SetText( "" ); - m_textNames[l].SetDiffuse( TEXT_COLOR ); - m_textScores[l].SetDiffuse( TEXT_COLOR ); + m_textNames[l].SetDiffuse( TEXT_COLOR(pts.colorIndex) ); + m_textScores[l].SetDiffuse( TEXT_COLOR(pts.colorIndex) ); bool bRecentHighScore = false; for( int p=0; pm_pRankingCourse && diff --git a/stepmania/src/ScreenRanking.h b/stepmania/src/ScreenRanking.h index 7f554147eb..c9be7af507 100644 --- a/stepmania/src/ScreenRanking.h +++ b/stepmania/src/ScreenRanking.h @@ -28,6 +28,7 @@ protected: struct PageToShow { enum { TYPE_CATEGORY, TYPE_COURSE } type; + int colorIndex; NotesType nt; // used in category and course RankingCategory category; Course* pCourse;