simplify
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
|
||||
@@ -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") );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user