Set up tsDestination directly. It doesn't make sense for a

function named "UpdateEnabledDisabled" to do this, and we
don't need to delay it anymore as GetWidthXY says (that was
before we moved the text into a frame).
This commit is contained in:
Glenn Maynard
2006-01-30 08:06:31 +00:00
parent e89b93ba21
commit cb0c7ce59d
3 changed files with 20 additions and 11 deletions
+11 -8
View File
@@ -556,6 +556,17 @@ void OptionRow::SetRowHasFocus( PlayerNumber pn, bool bRowHasFocus )
m_bRowHasFocus[pn] = bRowHasFocus;
}
void OptionRow::SetDestination( Actor::TweenState &ts )
{
if( m_Frame.DestTweenState() != ts )
{
m_Frame.StopTweening();
if( m_pParentType->TWEEN_SECONDS != 0 )
m_Frame.BeginTweening( m_pParentType->TWEEN_SECONDS );
m_Frame.DestTweenState() = ts;
}
}
void OptionRow::UpdateEnabledDisabled()
{
bool bThisRowHasFocusByAny = false;
@@ -568,14 +579,6 @@ void OptionRow::UpdateEnabledDisabled()
bool bRowEnabled = !m_pHand->m_Def.m_vEnabledForPlayers.empty();
if( m_Frame.DestTweenState() != m_tsDestination )
{
m_Frame.StopTweening();
if( m_pParentType->TWEEN_SECONDS != 0 )
m_Frame.BeginTweening( m_pParentType->TWEEN_SECONDS );
m_Frame.DestTweenState() = m_tsDestination;
}
if( bThisRowHasFocusByAny )
m_textTitle->RunCommands( m_pParentType->TITLE_GAIN_FOCUS_COMMAND );
else