fix Scroll's OffCommand played twice
This commit is contained in:
@@ -750,7 +750,7 @@ void ScreenSelectMaster::TweenOursOnScreen()
|
||||
vpns.push_back( p );
|
||||
}
|
||||
|
||||
if( SHOW_CURSOR )
|
||||
if( SHOW_ICON )
|
||||
{
|
||||
for( unsigned c=0; c<m_aGameCommands.size(); c++ )
|
||||
{
|
||||
@@ -760,16 +760,6 @@ 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] );
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user