Use Will's scrolling support to add next phase (scroll up) and interrupt (scroll down) in the duel state.
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user