more work on a new course editor

This commit is contained in:
Chris Danford
2005-06-28 08:11:30 +00:00
parent 6d9b726210
commit 6ab20c5ad9
20 changed files with 367 additions and 203 deletions
+30
View File
@@ -691,6 +691,36 @@ void OptionRow::SetOneSharedSelection( int iChoice )
SetOneSelection( pn, iChoice );
}
int OptionRow::GetChoiceInRowWithFocus( PlayerNumber pn ) const
{
if( m_RowDef.bOneChoiceForAllPlayers )
pn = PLAYER_1;
if( m_RowDef.choices.empty() )
return -1;
int iChoice = m_iChoiceInRowWithFocus[pn];
return iChoice;
}
int OptionRow::GetChoiceInRowWithFocusShared() const
{
return GetChoiceInRowWithFocus( (PlayerNumber)0 );
}
void OptionRow::SetChoiceInRowWithFocus( PlayerNumber pn, int iChoice )
{
if( m_RowDef.bOneChoiceForAllPlayers )
pn = PLAYER_1;
ASSERT(iChoice >= 0 && iChoice < (int)m_RowDef.choices.size());
m_iChoiceInRowWithFocus[pn] = iChoice;
}
void OptionRow::SetChoiceInRowWithFocusShared( int iChoice )
{
FOREACH_PlayerNumber( pn )
SetChoiceInRowWithFocus( pn, iChoice );
}
void OptionRow::SetExitText( CString sExitText )
{
BitmapText *bt = m_textItems.back();