summaryrefslogtreecommitdiff
path: root/src/actions/move.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-08 22:20:27 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-08 22:20:27 +0300
commitf019a9e52d0a3f5ca23681d5eb36bb2e56d37064 (patch)
tree33c4f14a56d1327b361dcc681712cfc105a7701e /src/actions/move.cpp
parent13b08d35c2d96ae734da14ab58d6263287e342c9 (diff)
downloadmanaplus-f019a9e52d0a3f5ca23681d5eb36bb2e56d37064.tar.gz
manaplus-f019a9e52d0a3f5ca23681d5eb36bb2e56d37064.tar.bz2
manaplus-f019a9e52d0a3f5ca23681d5eb36bb2e56d37064.tar.xz
manaplus-f019a9e52d0a3f5ca23681d5eb36bb2e56d37064.zip
Allow control popup menu by up/down keys.
Diffstat (limited to 'src/actions/move.cpp')
-rw-r--r--src/actions/move.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/actions/move.cpp b/src/actions/move.cpp
index 0fa4d4897..c75d24c36 100644
--- a/src/actions/move.cpp
+++ b/src/actions/move.cpp
@@ -30,6 +30,8 @@
#include "gui/windows/npcdialog.h"
#include "gui/windows/outfitwindow.h"
+#include "gui/popups/popupmenu.h"
+
#include "net/playerhandler.h"
#include "debug.h"
@@ -59,6 +61,11 @@ impHandler(moveUp)
{
if (inputManager.isActionActive(InputAction::EMOTE))
return directUp(event);
+ if (popupMenu->isPopupVisible())
+ {
+ popupMenu->moveUp();
+ return true;
+ }
return closeMoveNpcDialog(false);
}
@@ -66,6 +73,11 @@ impHandler(moveDown)
{
if (inputManager.isActionActive(InputAction::EMOTE))
return directDown(event);
+ if (popupMenu->isPopupVisible())
+ {
+ popupMenu->moveDown();
+ return true;
+ }
return closeMoveNpcDialog(false);
}