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:
techdragon.nguyen@gmail.com
2012-01-03 17:53:51 +00:00
parent 51d1873872
commit b03449cbf6
4 changed files with 38 additions and 8 deletions

View File

@@ -810,7 +810,28 @@ void GameStateShop::ButtonPressed(int controllerId, int controlId)
void GameStateShop::OnScroll(int inXVelocity, int inYVelocity)
{
if (abs(inXVelocity) > 200)
if (mStage == STAGE_ASK_ABOUT)
{
bool flickHorizontal = (abs(inXVelocity) > abs(inYVelocity));
if (flickHorizontal)
{
bool flickRight = inXVelocity > 0 ? true : false;
if (flickRight)
mEngine->HoldKey_NoRepeat(JGE_BTN_RIGHT);
else
mEngine->HoldKey_NoRepeat(JGE_BTN_LEFT);
}
else
{
bool flickUp = inYVelocity < 0 ? true : false;
if (flickUp)
mEngine->HoldKey_NoRepeat(JGE_BTN_UP);
else
mEngine->HoldKey_NoRepeat(JGE_BTN_DOWN);
}
}
else if (abs(inXVelocity) > 200)
{
bool flickRight = (inXVelocity >= 0);
if (flickRight)