fix overlapping text, wrong song counts
This commit is contained in:
@@ -137,17 +137,21 @@ void ScreenBookkeeping::ChangeView( View newView )
|
|||||||
|
|
||||||
const int iSongPerCol = 15;
|
const int iSongPerCol = 15;
|
||||||
|
|
||||||
|
int iSongIndex = 0;
|
||||||
for( int i=0; i<NUM_BOOKKEEPING_COLS; i++ )
|
for( int i=0; i<NUM_BOOKKEEPING_COLS; i++ )
|
||||||
{
|
{
|
||||||
RString s;
|
RString s;
|
||||||
for( int j=0; j<iSongPerCol; j++ )
|
for( int j=0; j<iSongPerCol; j++ )
|
||||||
{
|
{
|
||||||
int index = i*NUM_BOOKKEEPING_COLS + j;
|
if( iSongIndex < (int)vpSongs.size() )
|
||||||
if( index < (int)vpSongs.size() )
|
|
||||||
{
|
{
|
||||||
Song *pSong = vpSongs[index];
|
Song *pSong = vpSongs[iSongIndex];
|
||||||
int iCount = pProfile->GetSongNumTimesPlayed( pSong );
|
int iCount = pProfile->GetSongNumTimesPlayed( pSong );
|
||||||
s += ssprintf("%4d",iCount) + " " + pSong->GetDisplayFullTitle() + "\n";
|
RString sTitle = ssprintf("%4d",iCount) + " " + pSong->GetDisplayFullTitle();
|
||||||
|
if( sTitle.length() > 22 )
|
||||||
|
sTitle = sTitle.Left(20) + "...";
|
||||||
|
s += sTitle + "\n";
|
||||||
|
iSongIndex++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_textData[i].SetText( s );
|
m_textData[i].SetText( s );
|
||||||
|
|||||||
Reference in New Issue
Block a user