Only show some sorts in the normal rotation; get ot the rest via the "sort"
sort. This should probably be configurable in some way (but probably not a metric).
This commit is contained in:
@@ -1022,17 +1022,39 @@ bool MusicWheel::ChangeSort( SongSortOrder new_so ) // return true if change suc
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const SongSortOrder SortOrder[] =
|
||||||
|
{
|
||||||
|
SORT_GROUP,
|
||||||
|
SORT_TITLE,
|
||||||
|
SORT_BPM,
|
||||||
|
SORT_MOST_PLAYED,
|
||||||
|
SORT_ARTIST,
|
||||||
|
SORT_INVALID
|
||||||
|
};
|
||||||
|
|
||||||
bool MusicWheel::NextSort() // return true if change successful
|
bool MusicWheel::NextSort() // return true if change successful
|
||||||
{
|
{
|
||||||
SongSortOrder so = SongSortOrder( GAMESTATE->m_SongSortOrder+1 );
|
/* Is the current sort in the default sort order? */
|
||||||
if(so > MAX_SELECTABLE_SORT)
|
int cur = 0;
|
||||||
so = SongSortOrder(0);
|
while( SortOrder[cur] != SORT_INVALID && SortOrder[cur] != GAMESTATE->m_SongSortOrder )
|
||||||
|
++cur;
|
||||||
|
|
||||||
/* Disable SORT_PREFERRED for now, until it's implemented; right now it's not
|
SongSortOrder so;
|
||||||
* very different than SORT_GROUP. Once it's implemented, enable it only
|
if( SortOrder[cur] == SORT_INVALID )
|
||||||
* when no group is selected. */
|
{
|
||||||
if(so == SORT_PREFERRED)
|
/* It isn't, which means we're either in the sort menu or in a sort selected
|
||||||
so = SORT_GROUP;
|
* from the sort menu. If we're in the sort menu, return to the first sort.
|
||||||
|
* Otherwise, return to the sort menu. */
|
||||||
|
if( GAMESTATE->m_SongSortOrder == SORT_SORT )
|
||||||
|
so = SortOrder[0];
|
||||||
|
else
|
||||||
|
so = SORT_SORT;
|
||||||
|
} else {
|
||||||
|
++cur;
|
||||||
|
if( SortOrder[cur] == SORT_INVALID )
|
||||||
|
cur = 0;
|
||||||
|
so = SortOrder[cur];
|
||||||
|
}
|
||||||
|
|
||||||
return ChangeSort( so );
|
return ChangeSort( so );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user