simplify
This commit is contained in:
@@ -579,10 +579,9 @@ void OptionRow::UpdateText()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OptionRow::SetRowFocus( bool bRowHasFocus[NUM_PLAYERS] )
|
void OptionRow::SetRowHasFocus( PlayerNumber pn, bool bRowHasFocus )
|
||||||
{
|
{
|
||||||
FOREACH_PlayerNumber( p )
|
m_bRowHasFocus[pn] = bRowHasFocus;
|
||||||
m_bRowHasFocus[p] = bRowHasFocus[p];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OptionRow::UpdateEnabledDisabled()
|
void OptionRow::UpdateEnabledDisabled()
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ public:
|
|||||||
void PositionUnderlines( PlayerNumber pn );
|
void PositionUnderlines( PlayerNumber pn );
|
||||||
void PositionIcons();
|
void PositionIcons();
|
||||||
void UpdateText();
|
void UpdateText();
|
||||||
void SetRowFocus( bool bRowHasFocus[NUM_PLAYERS] );
|
void SetRowHasFocus( PlayerNumber pn, bool bRowHasFocus );
|
||||||
void UpdateEnabledDisabled();
|
void UpdateEnabledDisabled();
|
||||||
|
|
||||||
int GetOneSelection( PlayerNumber pn, bool bAllowFail=false ) const;
|
int GetOneSelection( PlayerNumber pn, bool bAllowFail=false ) const;
|
||||||
|
|||||||
@@ -540,11 +540,9 @@ void ScreenOptions::UpdateEnabledDisabled( int r )
|
|||||||
{
|
{
|
||||||
OptionRow &row = *m_pRows[r];
|
OptionRow &row = *m_pRows[r];
|
||||||
|
|
||||||
bool bRowHasFocus[NUM_PLAYERS];
|
|
||||||
FOREACH_PlayerNumber( pn )
|
FOREACH_PlayerNumber( pn )
|
||||||
bRowHasFocus[pn] = GAMESTATE->IsHumanPlayer(pn) && m_iCurrentRow[pn] == (int)r;
|
row.SetRowHasFocus( pn, GAMESTATE->IsHumanPlayer(pn) && m_iCurrentRow[pn] == (int)r );
|
||||||
|
|
||||||
row.SetRowFocus( bRowHasFocus );
|
|
||||||
row.UpdateEnabledDisabled();
|
row.UpdateEnabledDisabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user