Tied in my recent Android flick gesture addition to a Scroll() function. GameState now has a virtual function OnScroll() call that, by default is a no-op; each game state can choose to override how to respond to flick gestures. I've added one such override in the Deck Editor so that a flick up/down acts like the psp button up/down for scrolling between color filters.
This commit is contained in:
@@ -1668,3 +1668,12 @@ 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);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user