From c1429030641f6bb1b710bf7c9dcf46fb5c3b6f0b Mon Sep 17 00:00:00 2001 From: Andrew Wong Date: Mon, 28 Jul 2003 08:46:16 +0000 Subject: [PATCH] width of ??? unaffected by title length --- stepmania/src/ScreenUnlock.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/stepmania/src/ScreenUnlock.cpp b/stepmania/src/ScreenUnlock.cpp index 356c7b8e37..68939e2ce2 100644 --- a/stepmania/src/ScreenUnlock.cpp +++ b/stepmania/src/ScreenUnlock.cpp @@ -168,6 +168,7 @@ ScreenUnlock::ScreenUnlock() : ScreenAttract("ScreenUnlock") if( pSong->isLocked) { text->SetText("???"); + text->SetZoomX(1); } else { RageColor color = SONGMAN->GetGroupColor(pSong->m_pSong->m_sGroupName); text->SetGlobalDiffuseColor(color); @@ -269,8 +270,17 @@ ScreenUnlock::ScreenUnlock() : ScreenAttract("ScreenUnlock") /* Reset zoom before using SetTextMaxWidth. */ NewText->SetZoom(UNLOCK_TEXT_SCROLL_ZOOM); - CString title = pSong->m_pSong->GetDisplayMainTitle(); - CString subtitle = pSong->m_pSong->GetDisplaySubTitle(); + CString title; + CString subtitle; + + if (pSong->m_pSong == NULL) + continue; + else + { + title = pSong->m_pSong->GetDisplayMainTitle(); + subtitle = pSong->m_pSong->GetDisplaySubTitle(); + } + if( subtitle != "" ) title = title + "\n" + subtitle; NewText->SetTextMaxWidth( MaxWidth, title );