move this function out of the header
This commit is contained in:
@@ -1229,3 +1229,36 @@ void MusicWheel::TweenOffScreen()
|
||||
|
||||
|
||||
}
|
||||
|
||||
CString MusicWheel::GetSectionNameFromSongAndSort( Song* pSong, SongSortOrder so )
|
||||
{
|
||||
if( pSong == NULL )
|
||||
return "";
|
||||
|
||||
CString sTemp;
|
||||
|
||||
switch( so )
|
||||
{
|
||||
case SORT_GROUP:
|
||||
sTemp = pSong->m_sGroupName;
|
||||
return sTemp;
|
||||
// case SORT_ARTIST:
|
||||
// sTemp = pSong->m_sArtist;
|
||||
// sTemp.MakeUpper();
|
||||
// sTemp = (sTemp.GetLength() > 0) ? sTemp.Left(1) : "";
|
||||
// if( IsAnInt(sTemp) )
|
||||
// sTemp = "NUM";
|
||||
// return sTemp;
|
||||
case SORT_TITLE:
|
||||
sTemp = pSong->GetSortTitle();
|
||||
sTemp.MakeUpper();
|
||||
sTemp = (sTemp.GetLength() > 0) ? sTemp.Left(1) : "";
|
||||
if( IsAnInt(sTemp) )
|
||||
sTemp = "NUM";
|
||||
return sTemp;
|
||||
case SORT_BPM:
|
||||
case SORT_MOST_PLAYED:
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,41 +164,7 @@ protected:
|
||||
RageSoundSample m_soundStart;
|
||||
RageSoundSample m_soundLocked;
|
||||
|
||||
|
||||
|
||||
CString GetSectionNameFromSongAndSort( Song* pSong, SongSortOrder so )
|
||||
{
|
||||
if( pSong == NULL )
|
||||
return "";
|
||||
|
||||
CString sTemp;
|
||||
|
||||
switch( so )
|
||||
{
|
||||
case SORT_GROUP:
|
||||
sTemp = pSong->m_sGroupName;
|
||||
return sTemp;
|
||||
// case SORT_ARTIST:
|
||||
// sTemp = pSong->m_sArtist;
|
||||
// sTemp.MakeUpper();
|
||||
// sTemp = (sTemp.GetLength() > 0) ? sTemp.Left(1) : "";
|
||||
// if( IsAnInt(sTemp) )
|
||||
// sTemp = "NUM";
|
||||
// return sTemp;
|
||||
case SORT_TITLE:
|
||||
sTemp = pSong->GetSortTitle();
|
||||
sTemp.MakeUpper();
|
||||
sTemp = (sTemp.GetLength() > 0) ? sTemp.Left(1) : "";
|
||||
if( IsAnInt(sTemp) )
|
||||
sTemp = "NUM";
|
||||
return sTemp;
|
||||
case SORT_BPM:
|
||||
case SORT_MOST_PLAYED:
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
};
|
||||
|
||||
CString GetSectionNameFromSongAndSort( Song* pSong, SongSortOrder so );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user