phase out SetTextMaxWidth
This commit is contained in:
@@ -165,9 +165,9 @@ void DifficultyList::SetFromGameState()
|
||||
|
||||
Difficulty dc = pSteps->GetDifficulty();
|
||||
|
||||
m_Descriptions[m].SetZoomX(1);
|
||||
CString s = SONGMAN->GetDifficultyThemeName(dc);
|
||||
m_Descriptions[m].SetTextMaxWidth( DESCRIPTION_MAX_WIDTH, s );
|
||||
m_Descriptions[m].SetMaxWidth( DESCRIPTION_MAX_WIDTH );
|
||||
m_Descriptions[m].SetText( s );
|
||||
/* Don't mess with alpha; it might be fading on. */
|
||||
m_Descriptions[m].SetDiffuseColor( SONGMAN->GetDifficultyColor(dc) );
|
||||
|
||||
|
||||
@@ -464,8 +464,8 @@ void ScreenRanking::SetPage( PageToShow pts )
|
||||
m_sprCategory.Load( path );
|
||||
m_sprCategory.SetDiffuseAlpha(1);
|
||||
} else {
|
||||
m_textCategory.SetZoom(1);
|
||||
m_textCategory.SetTextMaxWidth( CATEGORY_WIDTH, pts.pCourse->m_sName );
|
||||
m_textCategory.SetMaxWidth( CATEGORY_WIDTH );
|
||||
m_textCategory.SetText( pts.pCourse->m_sName );
|
||||
m_textCategory.SetDiffuseAlpha(1);
|
||||
}
|
||||
|
||||
@@ -523,8 +523,8 @@ void ScreenRanking::SetPage( PageToShow pts )
|
||||
m_banner.ScaleToClipped( BANNER_WIDTH, BANNER_HEIGHT );
|
||||
m_banner.SetDiffuseAlpha(1);
|
||||
|
||||
m_textCategory.SetZoom(1);
|
||||
m_textCategory.SetTextMaxWidth( CATEGORY_WIDTH, pts.pSong->GetFullTranslitTitle() );
|
||||
m_textCategory.SetMaxWidth( CATEGORY_WIDTH );
|
||||
m_textCategory.SetText( pts.pSong->GetFullTranslitTitle() );
|
||||
m_textCategory.SetDiffuseAlpha(1);
|
||||
|
||||
m_sprType.SetDiffuse( RageColor(1,1,1,1) );
|
||||
|
||||
@@ -129,7 +129,6 @@ ScreenUnlock::ScreenUnlock( CString sClassName ) : ScreenAttract( sClassName )
|
||||
if ( pSong == NULL ) // no such song
|
||||
continue;
|
||||
|
||||
/* Reset zoom before using SetTextMaxWidth. */
|
||||
text->SetZoom(ScrollingTextZoom);
|
||||
|
||||
if (pSong && pSong->m_pSong != NULL)
|
||||
@@ -138,14 +137,16 @@ ScreenUnlock::ScreenUnlock( CString sClassName ) : ScreenAttract( sClassName )
|
||||
CString subtitle = pSong->m_pSong->GetDisplaySubTitle();
|
||||
if( subtitle != "" )
|
||||
title = title + "\n" + subtitle;
|
||||
text->SetTextMaxWidth( MaxWidth, title );
|
||||
text->SetMaxWidth( MaxWidth );
|
||||
text->SetText( title );
|
||||
}
|
||||
else // song is missing, might be a course
|
||||
{
|
||||
Course *crs = SONGMAN->FindCourse( DisplayedSong );
|
||||
if (crs != NULL)
|
||||
{
|
||||
text->SetTextMaxWidth( MaxWidth, crs->m_sName );
|
||||
text->SetMaxWidth( MaxWidth );
|
||||
text->SetText( crs->m_sName );
|
||||
text->Command("Diffuse,0,1,0,1");
|
||||
}
|
||||
else // entry isn't a song or course
|
||||
@@ -256,7 +257,6 @@ ScreenUnlock::ScreenUnlock( CString sClassName ) : ScreenAttract( sClassName )
|
||||
DisplayedSong.MakeUpper();
|
||||
UnlockEntry *pSong = UNLOCKSYS->FindLockEntry(DisplayedSong);
|
||||
|
||||
/* Reset zoom before using SetTextMaxWidth. */
|
||||
NewText->SetZoom(UNLOCK_TEXT_SCROLL_ZOOM);
|
||||
|
||||
CString title;
|
||||
@@ -272,7 +272,8 @@ ScreenUnlock::ScreenUnlock( CString sClassName ) : ScreenAttract( sClassName )
|
||||
|
||||
if( subtitle != "" )
|
||||
title = title + "\n" + subtitle;
|
||||
NewText->SetTextMaxWidth( MaxWidth, title );
|
||||
NewText->SetMaxWidth( MaxWidth );
|
||||
NewText->SetText( title );
|
||||
|
||||
RageColor color = SONGMAN->GetGroupColor(pSong->m_pSong->m_sGroupName);
|
||||
NewText->SetGlobalDiffuseColor(color);
|
||||
|
||||
@@ -101,9 +101,13 @@ void TextBanner::LoadFromString(
|
||||
m_textSubTitle.SetZoom( fSubTitleZoom );
|
||||
m_textArtist.SetZoom( fArtistZoom );
|
||||
|
||||
m_textTitle.SetTextMaxWidth( MAX_TITLE_WIDTH, sDisplayTitle, sTranslitTitle );
|
||||
m_textSubTitle.SetTextMaxWidth( MAX_SUB_TITLE_WIDTH, sDisplaySubTitle, sTranslitSubTitle );
|
||||
m_textArtist.SetTextMaxWidth( MAX_ARTIST_WIDTH, sDisplayArtist, sTranslitArtist );
|
||||
m_textTitle.SetMaxWidth( MAX_TITLE_WIDTH );
|
||||
m_textSubTitle.SetMaxWidth( MAX_SUB_TITLE_WIDTH );
|
||||
m_textArtist.SetMaxWidth( MAX_ARTIST_WIDTH );
|
||||
|
||||
m_textTitle.SetText( sDisplayTitle, sTranslitTitle );
|
||||
m_textSubTitle.SetText( sDisplaySubTitle, sTranslitSubTitle );
|
||||
m_textArtist.SetText( sDisplayArtist, sTranslitArtist );
|
||||
|
||||
const float fTitleY = bTwoLines ? TWO_LINES_TITLE_Y : THREE_LINES_TITLE_Y;
|
||||
const float fSubTitleY = bTwoLines ? 0.0f : THREE_LINES_SUB_TITLE_Y;
|
||||
|
||||
Reference in New Issue
Block a user