From 8da0e94aa2165347f839a995c55015e0bd963111 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 19 Jan 2006 01:23:14 +0000 Subject: [PATCH] UpdateText is used when the focus changes, so call it from SetChoiceInRowWithFocus. --- stepmania/src/OptionRow.cpp | 9 ++++----- stepmania/src/ScreenOptions.cpp | 5 ----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/stepmania/src/OptionRow.cpp b/stepmania/src/OptionRow.cpp index e869687b4e..c1bcaca077 100644 --- a/stepmania/src/OptionRow.cpp +++ b/stepmania/src/OptionRow.cpp @@ -202,11 +202,11 @@ void OptionRow::ChoicesChanged() m_vbSelected[p].insert( m_vbSelected[p].begin(), false ); } + InitText(); + /* When choices change, the old focus position is meaningless; reset it. */ FOREACH_PlayerNumber( p ) SetChoiceInRowWithFocus( p, 0 ); - - InitText(); } CString OptionRow::GetRowTitle() const @@ -492,9 +492,6 @@ void OptionRow::AfterImportOptions() FOREACH_HumanPlayer( p ) PositionUnderlines( p ); - FOREACH_HumanPlayer( p ) - UpdateText( p ); - m_textTitle->SetText( GetRowTitle() ); } @@ -837,6 +834,8 @@ void OptionRow::SetChoiceInRowWithFocus( PlayerNumber pn, int iChoice ) pn = PLAYER_1; ASSERT(iChoice >= 0 && iChoice < (int)m_pHand->m_Def.m_vsChoices.size()); m_iChoiceInRowWithFocus[pn] = iChoice; + + UpdateText( pn ); } void OptionRow::SetChoiceInRowWithFocusShared( int iChoice ) diff --git a/stepmania/src/ScreenOptions.cpp b/stepmania/src/ScreenOptions.cpp index 169820c124..be4034b598 100644 --- a/stepmania/src/ScreenOptions.cpp +++ b/stepmania/src/ScreenOptions.cpp @@ -1102,11 +1102,6 @@ void ScreenOptions::ChangeValueInRowRelative( int iRow, PlayerNumber pn, int iDe } } - /* For "long row-style" rows, update the text on screen to contain the newly- - * focused options. */ - FOREACH_HumanPlayer( p ) - m_pRows[iRow]->UpdateText( p ); - // XXX: What was this NAV_THREE_KEY_MENU special case for? if( bOneChanged ) // if( m_OptionsNavigation != NAV_THREE_KEY_MENU )