Fix the Default Sort metric. it wasn't being used to initially build the wheel, and then

when you chaged the sort, played a song, and selected another group, the sort would
suddenly pop back to the default, which wasn't being used as the default in the first place.
This commit is contained in:
Thad Ward
2003-09-07 14:29:59 +00:00
parent 18cd253b2c
commit 0d8a5f16a1
2 changed files with 12 additions and 9 deletions
+12 -1
View File
@@ -54,6 +54,9 @@ CachedThemeMetricI NUM_WHEEL_ITEMS_METRIC ("MusicWheel","NumWheelItems");
#define MENU_NAMES THEME->GetMetric ("MusicWheel","MenuNames")
#define MENU_ACTIONS THEME->GetMetric ("MusicWheel","MenuActions")
// leaving this one under ScreenSelectMusic because that is the only place it takes effect anyway.
#define DEFAULT_SORT THEME->GetMetric ("ScreenSelectMusic","DefaultSort")
const int MAX_WHEEL_SOUND_SPEED = 15;
@@ -155,7 +158,15 @@ MusicWheel::MusicWheel()
case PLAY_MODE_ONI: GAMESTATE->m_SongSortOrder = SORT_ONI_COURSES; break;
case PLAY_MODE_NONSTOP: GAMESTATE->m_SongSortOrder = SORT_NONSTOP_COURSES; break;
case PLAY_MODE_ENDLESS: GAMESTATE->m_SongSortOrder = SORT_ENDLESS_COURSES; break;
default: GAMESTATE->m_SongSortOrder = SortOrder[0]; break;
default:
// If there is a default sort requested..use it.
SongSortOrder so;
so = StringToSongSortOrder(DEFAULT_SORT);
if( so != SORT_INVALID )
GAMESTATE->m_SongSortOrder = so;
else
GAMESTATE->m_SongSortOrder = SortOrder[0];
break;
}
}