simplify
This commit is contained in:
@@ -147,7 +147,7 @@ void ScreenOptions::Init( InputMode im, OptionRow OptionRows[], int iNumOptionLi
|
|||||||
bt->EnableShadow( false );
|
bt->EnableShadow( false );
|
||||||
|
|
||||||
// set the X position of each item in the line
|
// set the X position of each item in the line
|
||||||
float fItemWidth = bt->GetWidestLineWidthInSourcePixels() * bt->GetZoomX();
|
const float fItemWidth = bt->GetZoomedWidth();
|
||||||
fX += fItemWidth/2;
|
fX += fItemWidth/2;
|
||||||
bt->SetX( fX );
|
bt->SetX( fX );
|
||||||
fX += fItemWidth/2 + ITEMS_GAP_X;
|
fX += fItemWidth/2 + ITEMS_GAP_X;
|
||||||
@@ -328,7 +328,7 @@ void ScreenOptions::GetWidthXY( PlayerNumber pn, int iRow, int &iWidthOut, int &
|
|||||||
{
|
{
|
||||||
BitmapText &text = GetTextItemForRow( pn, iRow );
|
BitmapText &text = GetTextItemForRow( pn, iRow );
|
||||||
|
|
||||||
iWidthOut = int(roundf( text.GetWidestLineWidthInSourcePixels() * text.GetZoomX() ));
|
iWidthOut = int(roundf( text.GetZoomedWidth() ));
|
||||||
iXOut = int(roundf( text.GetDestX() ));
|
iXOut = int(roundf( text.GetDestX() ));
|
||||||
/* We update m_fRowY, change colors and tween items, and then tween rows to
|
/* We update m_fRowY, change colors and tween items, and then tween rows to
|
||||||
* their final positions. (This is so we don't tween colors, too.) m_fRowY
|
* their final positions. (This is so we don't tween colors, too.) m_fRowY
|
||||||
|
|||||||
Reference in New Issue
Block a user