We always handle the case where m_Underline[pn] is empty, since SHOW_UNDERLINES may be false. So, don't add the underline, hide it and then special case not un-hiding it; just don't add it.
This commit is contained in:
@@ -332,7 +332,7 @@ void OptionRow::InitText()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// init underlines
|
// init underlines
|
||||||
if( m_pParentType->SHOW_UNDERLINES )
|
if( m_pParentType->SHOW_UNDERLINES && GetRowType() != OptionRow::RowType_Exit )
|
||||||
{
|
{
|
||||||
FOREACH_PlayerNumber( p )
|
FOREACH_PlayerNumber( p )
|
||||||
{
|
{
|
||||||
@@ -344,8 +344,6 @@ void OptionRow::InitText()
|
|||||||
GetWidthXY( p, 0, iWidth, iX, iY );
|
GetWidthXY( p, 0, iWidth, iX, iY );
|
||||||
pCursor->SetX( float(iX) );
|
pCursor->SetX( float(iX) );
|
||||||
pCursor->SetWidth( float(iWidth) );
|
pCursor->SetWidth( float(iWidth) );
|
||||||
if( GetRowType() == OptionRow::RowType_Exit )
|
|
||||||
pCursor->SetHidden( true );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -509,9 +507,6 @@ void OptionRow::LoadExit()
|
|||||||
|
|
||||||
void OptionRow::PositionUnderlines( PlayerNumber pn )
|
void OptionRow::PositionUnderlines( PlayerNumber pn )
|
||||||
{
|
{
|
||||||
if( m_RowType == RowType_Exit )
|
|
||||||
return;
|
|
||||||
|
|
||||||
vector<OptionsCursor*> &vpUnderlines = m_Underline[pn];
|
vector<OptionsCursor*> &vpUnderlines = m_Underline[pn];
|
||||||
if( vpUnderlines.empty() )
|
if( vpUnderlines.empty() )
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user