Fix item colors for LAYOUT_SHOW_ONE_IN_ROW,

m_bOneChoiceForAllPlayers rows.  Previously, we'd always use the
color for P2, causing the item to be colored as "not selected" even when
P1 selects it.
This commit is contained in:
Glenn Maynard
2006-01-16 02:21:38 +00:00
parent 58ac469571
commit 6a5ed74966
+8 -5
View File
@@ -663,12 +663,15 @@ void OptionRow::UpdateEnabledDisabled()
{
bool bRowEnabled = m_RowDef.m_vEnabledForPlayers.find(pn) != m_RowDef.m_vEnabledForPlayers.end();
if( m_bRowHasFocus[pn] ) color = m_pParentType->COLOR_SELECTED;
else if( bRowEnabled ) color = m_pParentType->COLOR_NOT_SELECTED;
else color = m_pParentType->COLOR_DISABLED;
if( !m_RowDef.m_bOneChoiceForAllPlayers )
{
if( m_bRowHasFocus[pn] ) color = m_pParentType->COLOR_SELECTED;
else if( bRowEnabled ) color = m_pParentType->COLOR_NOT_SELECTED;
else color = m_pParentType->COLOR_DISABLED;
if( m_bHidden )
color.a = 0;
if( m_bHidden )
color.a = 0;
}
unsigned item_no = m_RowDef.m_bOneChoiceForAllPlayers ? 0 : pn;