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:
@@ -54,6 +54,9 @@ CachedThemeMetricI NUM_WHEEL_ITEMS_METRIC ("MusicWheel","NumWheelItems");
|
|||||||
#define MENU_NAMES THEME->GetMetric ("MusicWheel","MenuNames")
|
#define MENU_NAMES THEME->GetMetric ("MusicWheel","MenuNames")
|
||||||
#define MENU_ACTIONS THEME->GetMetric ("MusicWheel","MenuActions")
|
#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;
|
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_ONI: GAMESTATE->m_SongSortOrder = SORT_ONI_COURSES; break;
|
||||||
case PLAY_MODE_NONSTOP: GAMESTATE->m_SongSortOrder = SORT_NONSTOP_COURSES; break;
|
case PLAY_MODE_NONSTOP: GAMESTATE->m_SongSortOrder = SORT_NONSTOP_COURSES; break;
|
||||||
case PLAY_MODE_ENDLESS: GAMESTATE->m_SongSortOrder = SORT_ENDLESS_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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,6 @@
|
|||||||
|
|
||||||
const int NUM_SCORE_DIGITS = 9;
|
const int NUM_SCORE_DIGITS = 9;
|
||||||
|
|
||||||
#define DEFAULT_SORT THEME->GetMetric ("ScreenSelectMusic","DefaultSort")
|
|
||||||
#define FOV THEME->GetMetricF("ScreenSelectMusic","FOV")
|
#define FOV THEME->GetMetricF("ScreenSelectMusic","FOV")
|
||||||
#define BANNER_WIDTH THEME->GetMetricF("ScreenSelectMusic","BannerWidth")
|
#define BANNER_WIDTH THEME->GetMetricF("ScreenSelectMusic","BannerWidth")
|
||||||
#define BANNER_HEIGHT THEME->GetMetricF("ScreenSelectMusic","BannerHeight")
|
#define BANNER_HEIGHT THEME->GetMetricF("ScreenSelectMusic","BannerHeight")
|
||||||
@@ -88,7 +87,6 @@ ScreenSelectMusic::ScreenSelectMusic() : Screen("ScreenSelectMusic")
|
|||||||
if( GAMESTATE->m_PlayMode == PLAY_MODE_INVALID )
|
if( GAMESTATE->m_PlayMode == PLAY_MODE_INVALID )
|
||||||
RageException::Throw( "The PlayMode has not been set. A theme must set the PlayMode before loading ScreenSelectMusic." );
|
RageException::Throw( "The PlayMode has not been set. A theme must set the PlayMode before loading ScreenSelectMusic." );
|
||||||
|
|
||||||
|
|
||||||
CodeDetector::RefreshCacheItems();
|
CodeDetector::RefreshCacheItems();
|
||||||
|
|
||||||
int p;
|
int p;
|
||||||
@@ -248,12 +246,6 @@ ScreenSelectMusic::ScreenSelectMusic() : Screen("ScreenSelectMusic")
|
|||||||
m_fPlaySampleCountdown = 0;
|
m_fPlaySampleCountdown = 0;
|
||||||
m_bAllowOptionsMenu = m_bAllowOptionsMenuRepeat = false;
|
m_bAllowOptionsMenu = m_bAllowOptionsMenuRepeat = false;
|
||||||
|
|
||||||
// If there is a default sort requested..use it.
|
|
||||||
SongSortOrder so;
|
|
||||||
so = StringToSongSortOrder(DEFAULT_SORT);
|
|
||||||
if( so != SORT_INVALID )
|
|
||||||
GAMESTATE->m_SongSortOrder = so;
|
|
||||||
|
|
||||||
UpdateOptionsDisplays();
|
UpdateOptionsDisplays();
|
||||||
|
|
||||||
AfterMusicChange();
|
AfterMusicChange();
|
||||||
|
|||||||
Reference in New Issue
Block a user