Reuse swipe code of Android with Qt, associate "swipe left" to "other cards" in the shop.

This commit is contained in:
Xawotihs
2011-08-14 18:13:28 +00:00
parent c188b4d104
commit 2c34a88ff0
3 changed files with 14 additions and 12 deletions
+10
View File
@@ -827,6 +827,16 @@ void GameStateShop::ButtonPressed(int controllerId, int controlId)
menu->Close();
}
void GameStateShop::OnScroll(int inXVelocity, int inYVelocity)
{
if (abs(inXVelocity) > 200)
{
bool flickLeft = (inXVelocity < 0);
if(!flickLeft)
mEngine->HoldKey_NoRepeat(JGE_BTN_PRI);
}
}
//ShopBooster
ShopBooster::ShopBooster()
{