fix for new ModeChoice format
This commit is contained in:
@@ -383,8 +383,8 @@ void MusicWheel::BuildWheelItemDatas( vector<WheelItemData> &arrayWheelItemDatas
|
|||||||
arrayWheelItemDatas.clear(); // clear out the previous wheel items
|
arrayWheelItemDatas.clear(); // clear out the previous wheel items
|
||||||
CString sNames = MENU_NAMES, sActions = MENU_ACTIONS;
|
CString sNames = MENU_NAMES, sActions = MENU_ACTIONS;
|
||||||
vector<CString> Names, Actions;
|
vector<CString> Names, Actions;
|
||||||
split( sNames, ",", Names );
|
split( sNames, ":", Names );
|
||||||
split( sActions, ",", Actions );
|
split( sActions, ":", Actions );
|
||||||
if( Names.size() != Actions.size() )
|
if( Names.size() != Actions.size() )
|
||||||
RageException::Throw("MusicWheel::MenuNames and MusicWheel::MenuActions must have the same number of components");
|
RageException::Throw("MusicWheel::MenuNames and MusicWheel::MenuActions must have the same number of components");
|
||||||
|
|
||||||
@@ -392,14 +392,16 @@ void MusicWheel::BuildWheelItemDatas( vector<WheelItemData> &arrayWheelItemDatas
|
|||||||
{
|
{
|
||||||
/* Look for sort names. */
|
/* Look for sort names. */
|
||||||
vector<CString> parts;
|
vector<CString> parts;
|
||||||
split( Actions[i], "-", parts );
|
split( Actions[i], ";", parts );
|
||||||
|
|
||||||
SongSortOrder so = SORT_INVALID;
|
SongSortOrder so = SORT_GROUP;
|
||||||
for( unsigned j = 0; so == SORT_INVALID && j < parts.size(); ++j )
|
for( unsigned j = 0; j < parts.size(); ++j )
|
||||||
so = StringToSongSortOrder( parts[j] );
|
{
|
||||||
|
CStringArray asBits;
|
||||||
if( so == SORT_INVALID )
|
split( parts[j], ",", asBits );
|
||||||
so = SORT_GROUP;
|
if( !asBits[0].CompareNoCase("sort") )
|
||||||
|
so = StringToSongSortOrder( asBits[1] );
|
||||||
|
}
|
||||||
|
|
||||||
WheelItemData wid( TYPE_SORT, NULL, "", NULL, SORT_MENU_COLOR, so );
|
WheelItemData wid( TYPE_SORT, NULL, "", NULL, SORT_MENU_COLOR, so );
|
||||||
wid.m_sLabel = Names[i];
|
wid.m_sLabel = Names[i];
|
||||||
|
|||||||
Reference in New Issue
Block a user