Implemented directional controls on Filters so that you can now navigate the Filters menu on Touch interfaces for the Deck Editor and Shop screens. It's not the best implementation but it at least works across all platforms. swipe will now move the highlighted cursor to the correct direction.
in release builds, test suite will now be disabled
This commit is contained in:
@@ -1690,13 +1690,22 @@ void GameStateDeckViewer::ButtonPressed(int controllerId, int controlId)
|
||||
|
||||
void GameStateDeckViewer::OnScroll(int inXVelocity, int inYVelocity)
|
||||
{
|
||||
if (abs(inYVelocity) > 300)
|
||||
{
|
||||
bool flickUpwards = (inYVelocity < 0);
|
||||
mEngine->HoldKey_NoRepeat(flickUpwards ? JGE_BTN_DOWN : JGE_BTN_UP);
|
||||
bool flickHorizontal = (abs(inXVelocity) > abs(inYVelocity));
|
||||
bool flickUp = inYVelocity < 0 ? true : false;
|
||||
bool flickRight = inXVelocity > 0 ? true : false;
|
||||
|
||||
} else if (abs(inXVelocity) > 300)
|
||||
if (mStage == STAGE_FILTERS)
|
||||
{
|
||||
mEngine->HoldKey_NoRepeat(JGE_BTN_PRI);
|
||||
if (flickHorizontal)
|
||||
mEngine->HoldKey_NoRepeat( flickRight ? JGE_BTN_RIGHT : JGE_BTN_LEFT);
|
||||
else
|
||||
mEngine->HoldKey_NoRepeat(flickUp ? JGE_BTN_UP : JGE_BTN_DOWN);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (flickHorizontal && (abs(inXVelocity) > 300))
|
||||
mEngine->HoldKey_NoRepeat(JGE_BTN_PRI);
|
||||
else if (!flickHorizontal && (abs(inYVelocity) > 300))
|
||||
mEngine->HoldKey_NoRepeat(flickUp ? JGE_BTN_UP : JGE_BTN_DOWN);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user