cleanup
This commit is contained in:
+12
-12
@@ -314,20 +314,20 @@ void OptionRow::InitText()
|
|||||||
// init text
|
// init text
|
||||||
FOREACH_PlayerNumber( p )
|
FOREACH_PlayerNumber( p )
|
||||||
{
|
{
|
||||||
BitmapText *bt = new BitmapText( m_pParentType->m_textItemParent );
|
BitmapText *pText = new BitmapText( m_pParentType->m_textItemParent );
|
||||||
m_textItems.push_back( bt );
|
m_textItems.push_back( pText );
|
||||||
|
|
||||||
bt->RunCommands( m_pParentType->ITEMS_ON_COMMAND );
|
pText->RunCommands( m_pParentType->ITEMS_ON_COMMAND );
|
||||||
bt->SetShadowLength( 0 );
|
pText->SetShadowLength( 0 );
|
||||||
|
|
||||||
if( m_RowDef.m_bOneChoiceForAllPlayers )
|
if( m_RowDef.m_bOneChoiceForAllPlayers )
|
||||||
{
|
{
|
||||||
bt->SetX( m_pParentType->ITEMS_LONG_ROW_SHARED_X );
|
pText->SetX( m_pParentType->ITEMS_LONG_ROW_SHARED_X );
|
||||||
break; // only initialize one item since it's shared
|
break; // only initialize one item since it's shared
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bt->SetX( m_pParentType->ITEMS_LONG_ROW_X.GetValue(p) );
|
pText->SetX( m_pParentType->ITEMS_LONG_ROW_X.GetValue(p) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -336,16 +336,16 @@ void OptionRow::InitText()
|
|||||||
{
|
{
|
||||||
FOREACH_PlayerNumber( p )
|
FOREACH_PlayerNumber( p )
|
||||||
{
|
{
|
||||||
OptionsCursor *ul = new OptionsCursor( m_pParentType->m_UnderlineParent );
|
OptionsCursor *pCursor = new OptionsCursor( m_pParentType->m_UnderlineParent );
|
||||||
m_Underline[p].push_back( ul );
|
m_Underline[p].push_back( pCursor );
|
||||||
|
|
||||||
ul->Set( p );
|
pCursor->Set( p );
|
||||||
int iWidth, iX, iY;
|
int iWidth, iX, iY;
|
||||||
GetWidthXY( p, 0, iWidth, iX, iY );
|
GetWidthXY( p, 0, iWidth, iX, iY );
|
||||||
ul->SetX( float(iX) );
|
pCursor->SetX( float(iX) );
|
||||||
ul->SetWidth( float(iWidth) );
|
pCursor->SetWidth( float(iWidth) );
|
||||||
if( GetRowType() == OptionRow::RowType_Exit )
|
if( GetRowType() == OptionRow::RowType_Exit )
|
||||||
ul->SetHidden( true );
|
pCursor->SetHidden( true );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user