Do not allow that the selection moves outside in grid view.

This commit is contained in:
Tobias Loose
2013-12-08 22:43:03 +01:00
parent 1cc65ab611
commit 718ceca919
2 changed files with 5 additions and 6 deletions

View File

@@ -407,9 +407,8 @@ void GameStateDeckViewer::Update(float dt)
case JGE_BTN_RIGHT:
case JGE_BTN_UP:
case JGE_BTN_DOWN:
if(last_user_activity > 0.2)
if(mView->ButtonPressed(button))
{
mView->ButtonPressed(button);
last_user_activity = 0;
mStage = STAGE_WAITING;
}

View File

@@ -147,22 +147,22 @@ bool GridDeckView::ButtonPressed(Buttons button)
switch(button)
{
case JGE_BTN_LEFT:
if(mButtonMode) moveSelection(-2, true);
if(mButtonMode && mScrollEasing.finished()) moveSelection(-2, true);
else changePositionAnimated(-1);
last_user_activity = 0;
break;
case JGE_BTN_RIGHT:
if(mButtonMode) moveSelection(2, true);
if(mButtonMode && mScrollEasing.finished()) moveSelection(2, true);
else changePositionAnimated(1);
last_user_activity = 0;
break;
case JGE_BTN_UP:
if(mButtonMode) moveSelection(-1, true);
if(mButtonMode && mScrollEasing.finished()) moveSelection(-1, true);
else changeFilterAnimated(1);
last_user_activity = 0;
break;
case JGE_BTN_DOWN:
if(mButtonMode) moveSelection(1, true);
if(mButtonMode && mScrollEasing.finished()) moveSelection(1, true);
else changeFilterAnimated(-1);
last_user_activity = 0;
break;