From 86a8eb0412e3462999b1a4caa4bc0c5d91334945 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 18 Mar 2007 00:10:40 +0000 Subject: [PATCH] load commands and set xy on load, not in TweenOnScreen --- stepmania/src/ScreenSelectMaster.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/stepmania/src/ScreenSelectMaster.cpp b/stepmania/src/ScreenSelectMaster.cpp index 5c49cef113..8f9a6a895b 100644 --- a/stepmania/src/ScreenSelectMaster.cpp +++ b/stepmania/src/ScreenSelectMaster.cpp @@ -118,6 +118,8 @@ void ScreenSelectMaster::Init() m_vsprIcon[c].Load( THEME->GetPathG(m_sName,sElement) ); RString sName = "Icon" "Choice" + mc.m_sName; m_vsprIcon[c]->SetName( sName ); + if( USE_ICON_METRICS ) + LOAD_ALL_COMMANDS_AND_SET_XY( m_vsprIcon[c] ); this->AddChild( m_vsprIcon[c] ); } @@ -158,6 +160,7 @@ void ScreenSelectMaster::Init() m_Scroller[*p].SetSecondsPerItem( SCROLLER_SECONDS_PER_ITEM ); m_Scroller[*p].SetNumSubdivisions( SCROLLER_SUBDIVISIONS ); m_Scroller[*p].SetName( "Scroller"+PLAYER_APPEND_NO_SPACE(*p) ); + LOAD_ALL_COMMANDS_AND_SET_XY( m_Scroller[*p] ); this->AddChild( &m_Scroller[*p] ); } } @@ -794,10 +797,7 @@ void ScreenSelectMaster::TweenOnScreen() { m_vsprIcon[c]->PlayCommand( (int(c) == m_iChoice[0])? "GainFocus":"LoseFocus" ); m_vsprIcon[c]->FinishTweening(); - if( USE_ICON_METRICS ) - LOAD_ALL_COMMANDS_AND_SET_XY_AND_ON_COMMAND( m_vsprIcon[c] ); - else - m_vsprIcon[c]->PlayCommand( "On" ); + m_vsprIcon[c]->PlayCommand( "On" ); } } @@ -814,7 +814,7 @@ void ScreenSelectMaster::TweenOnScreen() } m_Scroller[*p].SetCurrentAndDestinationItem( (float)m_iChoice[*p] ); - LOAD_ALL_COMMANDS_AND_SET_XY_AND_ON_COMMAND( m_Scroller[*p] ); + m_Scroller[*p].PlayCommand( "On" ); } }