simplify
(this stuff looks like overzealous abstraction, but I think most of it used to be more complicated code that was moved off into other classes, and the stubs were left behind)
This commit is contained in:
@@ -375,17 +375,11 @@ void ScreenOptions::GetWidthXY( PlayerNumber pn, int iRow, int iChoiceOnRow, int
|
||||
row.GetWidthXY( pn, iChoiceOnRow, iWidthOut, iXOut, iYOut );
|
||||
}
|
||||
|
||||
void ScreenOptions::PositionUnderlines( int r, PlayerNumber pn )
|
||||
{
|
||||
OptionRow &row = *m_pRows[r];
|
||||
row.PositionUnderlines( pn );
|
||||
}
|
||||
|
||||
void ScreenOptions::PositionAllUnderlines()
|
||||
{
|
||||
for( unsigned r=0; r<m_pRows.size(); r++ )
|
||||
FOREACH_HumanPlayer( p )
|
||||
PositionUnderlines( r, p );
|
||||
m_pRows[r]->PositionUnderlines( p );
|
||||
}
|
||||
|
||||
void ScreenOptions::PositionIcons()
|
||||
@@ -912,7 +906,7 @@ void ScreenOptions::ProcessMenuStart( const InputEventPlus &input )
|
||||
else
|
||||
m_SoundToggleOff.Play();
|
||||
|
||||
PositionUnderlines( iCurRow, pn );
|
||||
m_pRows[iCurRow]->PositionUnderlines( pn );
|
||||
RefreshIcons( iCurRow, pn );
|
||||
|
||||
if( row.GetFirstItemGoesDown() )
|
||||
|
||||
@@ -49,7 +49,6 @@ protected:
|
||||
|
||||
void GetWidthXY( PlayerNumber pn, int iRow, int iChoiceOnRow, int &iWidthOut, int &iXOut, int &iYOut ) const;
|
||||
CString GetExplanationText( int iRow ) const;
|
||||
void PositionUnderlines( int iRow, PlayerNumber pn );
|
||||
void PositionAllUnderlines();
|
||||
void PositionIcons();
|
||||
void RefreshIcons( int iRow, PlayerNumber pn );
|
||||
|
||||
@@ -115,7 +115,7 @@ void ScreenPlayerOptions::Input( const InputEventPlus &input )
|
||||
vector<PlayerNumber> v;
|
||||
v.push_back( pn );
|
||||
this->ImportOptions( r, v );
|
||||
this->PositionUnderlines( r, pn );
|
||||
m_pRows[r]->PositionUnderlines( pn );
|
||||
this->UpdateDisqualified( r, pn );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user