diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-18 19:47:28 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-18 19:47:28 +0300 |
commit | 7da95c7f4da447876458a0b1a17736b9a2865844 (patch) | |
tree | 4b6ac0ab5bc32a11234a5363de95d0cfec8cb7d5 /src/gui/widgets/guitable.cpp | |
parent | 515ce6c1413b5e3da131f3e4997abdc39c003a2c (diff) | |
download | manaplus-7da95c7f4da447876458a0b1a17736b9a2865844.tar.gz manaplus-7da95c7f4da447876458a0b1a17736b9a2865844.tar.bz2 manaplus-7da95c7f4da447876458a0b1a17736b9a2865844.tar.xz manaplus-7da95c7f4da447876458a0b1a17736b9a2865844.zip |
Move inputaction into separate file.
Diffstat (limited to 'src/gui/widgets/guitable.cpp')
-rw-r--r-- | src/gui/widgets/guitable.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp index 9aa17c512..ba2c36713 100644 --- a/src/gui/widgets/guitable.cpp +++ b/src/gui/widgets/guitable.cpp @@ -28,6 +28,7 @@ #include "events/keyevent.h" +#include "input/inputaction.h" #include "input/keydata.h" #include "listeners/guitableactionlistener.h" @@ -370,38 +371,38 @@ void GuiTable::keyPressed(KeyEvent& event) { const int action = event.getActionId(); - if (action == Input::KEY_GUI_SELECT) + if (action == InputAction::GUI_SELECT) { distributeActionEvent(); event.consume(); } - else if (action == Input::KEY_GUI_UP) + else if (action == InputAction::GUI_UP) { setSelectedRow(mSelectedRow - 1); event.consume(); } - else if (action == Input::KEY_GUI_DOWN) + else if (action == InputAction::GUI_DOWN) { setSelectedRow(mSelectedRow + 1); event.consume(); } - else if (action == Input::KEY_GUI_LEFT) + else if (action == InputAction::GUI_LEFT) { setSelectedColumn(mSelectedColumn - 1); event.consume(); } - else if (action == Input::KEY_GUI_RIGHT) + else if (action == InputAction::GUI_RIGHT) { setSelectedColumn(mSelectedColumn + 1); event.consume(); } - else if (action == Input::KEY_GUI_HOME) + else if (action == InputAction::GUI_HOME) { setSelectedRow(0); setSelectedColumn(0); event.consume(); } - else if (action == Input::KEY_GUI_END && mModel) + else if (action == InputAction::GUI_END && mModel) { setSelectedRow(mModel->getRows() - 1); setSelectedColumn(mModel->getColumns() - 1); |