From 01d7bab936c2a57324d5bd65c1988c329941a9dc Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 24 Nov 2003 02:41:52 +0000 Subject: [PATCH] simplify --- stepmania/src/GroupList.cpp | 2 +- stepmania/src/MusicWheelItem.cpp | 4 ++-- stepmania/src/ScreenMiniMenu.cpp | 4 ++-- stepmania/src/ScreenPrompt.cpp | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/stepmania/src/GroupList.cpp b/stepmania/src/GroupList.cpp index 5499f7634a..fc66d47996 100644 --- a/stepmania/src/GroupList.cpp +++ b/stepmania/src/GroupList.cpp @@ -92,7 +92,7 @@ void GroupList::Load( const CStringArray& asGroupNames ) void GroupList::ResetTextSize( int i ) { BitmapText *label = m_textLabels[i]; - const float fTextWidth = (float)label->GetWidestLineWidthInSourcePixels(); + const float fTextWidth = (float)label->GetUnzoomedWidth(); const float fButtonWidth = m_sprButtons[i]->GetZoomedWidth(); float fZoom = fButtonWidth/fTextWidth; diff --git a/stepmania/src/MusicWheelItem.cpp b/stepmania/src/MusicWheelItem.cpp index 4bfb294790..f4bb0639d0 100644 --- a/stepmania/src/MusicWheelItem.cpp +++ b/stepmania/src/MusicWheelItem.cpp @@ -159,8 +159,8 @@ void MusicWheelItem::LoadFromWheelItemData( WheelItemData* pWID ) bt->SetDiffuse( data->m_color ); bt->TurnRainbowOff(); - float fSourcePixelWidth = (float)bt->GetWidestLineWidthInSourcePixels(); - float fMaxTextWidth = 200; + const float fSourcePixelWidth = (float)bt->GetUnzoomedWidth(); + const float fMaxTextWidth = 200; if( fSourcePixelWidth > fMaxTextWidth ) bt->SetZoomX( fMaxTextWidth / fSourcePixelWidth ); } diff --git a/stepmania/src/ScreenMiniMenu.cpp b/stepmania/src/ScreenMiniMenu.cpp index 91312c6800..4c6a423e79 100644 --- a/stepmania/src/ScreenMiniMenu.cpp +++ b/stepmania/src/ScreenMiniMenu.cpp @@ -91,8 +91,8 @@ ScreenMiniMenu::ScreenMiniMenu( Menu* pDef, ScreenMessage SM_SendOnOK, ScreenMes fLongestLabelPlusAnswer = max( fLongestLabelPlusAnswer, - m_textLabel[i].GetWidestLineWidthInSourcePixels() * ZOOM_SELECTED + - m_textAnswer[i].GetWidestLineWidthInSourcePixels() * ZOOM_SELECTED ); + m_textLabel[i].GetUnzoomedWidth() * ZOOM_SELECTED + + m_textAnswer[i].GetUnzoomedWidth() * ZOOM_SELECTED ); if( !bMarkedFirstEnabledLine && line.enabled ) { diff --git a/stepmania/src/ScreenPrompt.cpp b/stepmania/src/ScreenPrompt.cpp index 4d318fc790..47f50ad4bc 100644 --- a/stepmania/src/ScreenPrompt.cpp +++ b/stepmania/src/ScreenPrompt.cpp @@ -73,7 +73,7 @@ ScreenPrompt::ScreenPrompt( ScreenMessage SM_SendWhenDone, CString sText, bool b } m_rectAnswerBox.SetXY( m_textAnswer[m_bAnswer].GetX(), m_textAnswer[m_bAnswer].GetY() ); - m_rectAnswerBox.SetZoomX( m_textAnswer[m_bAnswer].GetWidestLineWidthInSourcePixels()+10.0f ); + m_rectAnswerBox.SetZoomX( m_textAnswer[m_bAnswer].GetUnzoomedWidth()+10.0f ); m_rectAnswerBox.SetZoomY( 30 ); m_textAnswer[m_bAnswer].SetEffectGlowShift(); @@ -153,7 +153,7 @@ void ScreenPrompt::MenuRight( PlayerNumber pn ) m_rectAnswerBox.StopTweening(); m_rectAnswerBox.BeginTweening( 0.2f ); m_rectAnswerBox.SetXY( m_textAnswer[m_bAnswer].GetX(), m_textAnswer[m_bAnswer].GetY() ); - m_rectAnswerBox.SetZoomX( m_textAnswer[m_bAnswer].GetWidestLineWidthInSourcePixels()+10.0f ); + m_rectAnswerBox.SetZoomX( m_textAnswer[m_bAnswer].GetUnzoomedWidth()+10.0f ); SOUND->PlayOnce( THEME->GetPathToS("ScreenPrompt change") ); }