Use Will's scrolling support to add next phase (scroll up) and interrupt (scroll down) in the duel state.

This commit is contained in:
Xawotihs
2011-06-26 20:51:45 +00:00
parent bac4050de7
commit 7bb49068b1
2 changed files with 12 additions and 0 deletions

View File

@@ -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,

View File

@@ -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);
}
}