hide underlines of hidden rows (for real this time)

This commit is contained in:
Chris Danford
2005-02-21 20:36:07 +00:00
parent 31951e4120
commit 9614e2507c
+5 -3
View File
@@ -408,15 +408,17 @@ void OptionRow::UpdateEnabledDisabled(
case LAYOUT_SHOW_ONE_IN_ROW: case LAYOUT_SHOW_ONE_IN_ROW:
FOREACH_HumanPlayer( pn ) FOREACH_HumanPlayer( pn )
{ {
bool bEnabled = m_RowDef.m_vEnabledForPlayers.find(pn) != m_RowDef.m_vEnabledForPlayers.end(); bool bRowEnabled = m_RowDef.m_vEnabledForPlayers.find(pn) != m_RowDef.m_vEnabledForPlayers.end();
if( bThisRowHasFocus[pn] ) if( bThisRowHasFocus[pn] )
color = colorFocus; color = colorFocus;
else if( bEnabled ) else if( bRowEnabled )
color = colorNoFocus; color = colorNoFocus;
else else
color = colorDisabled; color = colorDisabled;
float fEnabledDisabledAlpha = bRowEnabled ? 1:0;
unsigned item_no = m_RowDef.bOneChoiceForAllPlayers ? 0 : pn; unsigned item_no = m_RowDef.bOneChoiceForAllPlayers ? 0 : pn;
// If player_no is 2 and there is no player 1: // If player_no is 2 and there is no player 1:
@@ -435,7 +437,7 @@ void OptionRow::UpdateEnabledDisabled(
OptionsCursor &ul = *m_Underline[p][item_no]; OptionsCursor &ul = *m_Underline[p][item_no];
ul.StopTweening(); ul.StopTweening();
ul.BeginTweening( fTweenSeconds ); ul.BeginTweening( fTweenSeconds );
ul.SetDiffuseAlpha( fDiffuseAlpha ); ul.SetDiffuseAlpha( fEnabledDisabledAlpha );
ul.SetY( m_fY ); ul.SetY( m_fY );
} }
} }