From 6a5ed749668e2bd4507c7f95236014a6baa3e1b2 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 16 Jan 2006 02:21:38 +0000 Subject: [PATCH] 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. --- stepmania/src/OptionRow.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/stepmania/src/OptionRow.cpp b/stepmania/src/OptionRow.cpp index 91a9a28fc5..aad1015726 100644 --- a/stepmania/src/OptionRow.cpp +++ b/stepmania/src/OptionRow.cpp @@ -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;