diff --git a/stepmania/src/ScreenSelectMaster.cpp b/stepmania/src/ScreenSelectMaster.cpp index 6a1da4a16c..5e3a3c41db 100644 --- a/stepmania/src/ScreenSelectMaster.cpp +++ b/stepmania/src/ScreenSelectMaster.cpp @@ -750,7 +750,7 @@ void ScreenSelectMaster::TweenOursOnScreen() vpns.push_back( p ); } - if( SHOW_CURSOR ) + if( SHOW_ICON ) { for( unsigned c=0; cSetXY( GetCursorX(*p), GetCursorY(*p) ); - ON_COMMAND( m_sprCursor[*p] ); - } - } - if( SHOW_SCROLLER ) { FOREACH( PlayerNumber, vpns, p ) @@ -788,6 +778,16 @@ void ScreenSelectMaster::TweenOursOnScreen() } } + // Need to SetXY of Cursor after Icons since it depends on the Icons' positions. + if( SHOW_CURSOR ) + { + FOREACH( PlayerNumber, vpns, p ) + { + m_sprCursor[*p]->SetXY( GetCursorX(*p), GetCursorY(*p) ); + ON_COMMAND( m_sprCursor[*p] ); + } + } + //We have to move page two's explanation and more off the screen //so it doesn't just sit there on page one. (Thanks Zhek) @@ -844,10 +844,7 @@ void ScreenSelectMaster::TweenOursOffScreen() if( SHOW_SCROLLER ) { FOREACH( PlayerNumber, vpns, p ) - { - OFF_COMMAND( m_sprScroll[c][*p] ); COMMAND( m_sprScroll[c][*p], SelectedByEitherPlayer? "OffFocused":"OffUnfocused" ); - } } } @@ -865,13 +862,15 @@ void ScreenSelectMaster::TweenOursOffScreen() float ScreenSelectMaster::GetCursorX( PlayerNumber pn ) { int iChoice = m_iChoice[pn]; - return m_sprIcon[iChoice]->GetX() + CURSOR_OFFSET_X_FROM_ICON.GetValue(pn); + AutoActor spr = m_sprIcon[iChoice]; + return spr->GetX() + CURSOR_OFFSET_X_FROM_ICON.GetValue(pn); } float ScreenSelectMaster::GetCursorY( PlayerNumber pn ) { int iChoice = m_iChoice[pn]; - return m_sprIcon[iChoice]->GetY() + CURSOR_OFFSET_Y_FROM_ICON.GetValue(pn); + AutoActor &spr = m_sprIcon[iChoice]; + return spr->GetY() + CURSOR_OFFSET_Y_FROM_ICON.GetValue(pn); } /* diff --git a/stepmania/src/ScreenSelectMaster.h b/stepmania/src/ScreenSelectMaster.h index 4b7620bb3a..8790da9a8c 100644 --- a/stepmania/src/ScreenSelectMaster.h +++ b/stepmania/src/ScreenSelectMaster.h @@ -34,8 +34,8 @@ protected: Page GetCurrentPage() const; ThemeMetric SHOW_ICON; - ThemeMetric SHOW_CURSOR; ThemeMetric SHOW_SCROLLER; + ThemeMetric SHOW_CURSOR; ThemeMetric SHARED_SELECTION; ThemeMetric NUM_CHOICES_ON_PAGE_1; ThemeMetric1D CURSOR_OFFSET_X_FROM_ICON;