diff --git a/projects/mtg/include/GameStateDuel.h b/projects/mtg/include/GameStateDuel.h index e712151b1..e30ca1ff3 100644 --- a/projects/mtg/include/GameStateDuel.h +++ b/projects/mtg/include/GameStateDuel.h @@ -59,6 +59,8 @@ public: virtual void Render(); void initRand(unsigned seed = 0); + void OnScroll(int inXVelocity, int inYVelocity); + enum ENUM_DUEL_STATE_MENU_ITEM { MENUITEM_CANCEL = kCancelMenuID, diff --git a/projects/mtg/src/GameStateDuel.cpp b/projects/mtg/src/GameStateDuel.cpp index 5591404c9..ad919abff 100644 --- a/projects/mtg/src/GameStateDuel.cpp +++ b/projects/mtg/src/GameStateDuel.cpp @@ -855,3 +855,13 @@ void GameStateDuel::ButtonPressed(int controllerId, int controlId) } } + +void GameStateDuel::OnScroll(int inXVelocity, int inYVelocity) +{ + if (abs(inYVelocity) > 300) + { + bool flickUpwards = (inYVelocity < 0); + mEngine->HoldKey_NoRepeat(flickUpwards ? JGE_BTN_PREV : JGE_BTN_SEC); + } +} +