add SetOneSharedSelectionIfPresent

This commit is contained in:
Chris Danford
2005-07-13 19:09:13 +00:00
parent 3752bdf702
commit 8998dfc589
2 changed files with 13 additions and 0 deletions
+12
View File
@@ -721,6 +721,18 @@ void OptionRow::SetOneSharedSelection( int iChoice )
SetOneSelection( pn, iChoice );
}
void OptionRow::SetOneSharedSelectionIfPresent( const CString &sChoice )
{
for( unsigned i=0; i<m_RowDef.m_vsChoices.size(); i++ )
{
if( sChoice == m_RowDef.m_vsChoices[i] )
{
SetOneSharedSelection( i );
break;
}
}
}
int OptionRow::GetChoiceInRowWithFocus( PlayerNumber pn ) const
{
if( m_RowDef.m_bOneChoiceForAllPlayers )