pull pn loop out of UpdateText
This commit is contained in:
@@ -492,6 +492,7 @@ void OptionRow::AfterImportOptions()
|
|||||||
FOREACH_HumanPlayer( p )
|
FOREACH_HumanPlayer( p )
|
||||||
PositionUnderlines( p );
|
PositionUnderlines( p );
|
||||||
|
|
||||||
|
FOREACH_HumanPlayer( p )
|
||||||
UpdateText();
|
UpdateText();
|
||||||
|
|
||||||
m_textTitle->SetText( GetRowTitle() );
|
m_textTitle->SetText( GetRowTitle() );
|
||||||
@@ -546,17 +547,16 @@ void OptionRow::PositionIcons()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OptionRow::UpdateText()
|
void OptionRow::UpdateText( PlayerNumber p )
|
||||||
{
|
{
|
||||||
switch( m_pHand->m_Def.m_layoutType )
|
switch( m_pHand->m_Def.m_layoutType )
|
||||||
{
|
{
|
||||||
case LAYOUT_SHOW_ONE_IN_ROW:
|
case LAYOUT_SHOW_ONE_IN_ROW:
|
||||||
FOREACH_HumanPlayer( p )
|
|
||||||
{
|
{
|
||||||
unsigned pn = m_pHand->m_Def.m_bOneChoiceForAllPlayers ? 0 : p;
|
unsigned pn = m_pHand->m_Def.m_bOneChoiceForAllPlayers ? 0 : p;
|
||||||
int iChoiceWithFocus = m_iChoiceInRowWithFocus[pn];
|
int iChoiceWithFocus = m_iChoiceInRowWithFocus[pn];
|
||||||
if( iChoiceWithFocus == -1 )
|
if( iChoiceWithFocus == -1 )
|
||||||
continue;
|
break;
|
||||||
|
|
||||||
CString sText = m_pHand->m_Def.m_vsChoices[iChoiceWithFocus];
|
CString sText = m_pHand->m_Def.m_vsChoices[iChoiceWithFocus];
|
||||||
PrepareItemText( sText );
|
PrepareItemText( sText );
|
||||||
|
|||||||
Reference in New Issue
Block a user