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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user