diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-01-30 22:10:01 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-01-31 01:06:49 +0300 |
commit | ec5a06754164bb2f77d3627990f896c040fc1c76 (patch) | |
tree | cad8586f26675a80d7dae4c878a7436ac73feefd | |
parent | 5015c59af9d28b3a3bbedfd54b3827dd96597efa (diff) | |
download | mv-ec5a06754164bb2f77d3627990f896c040fc1c76.tar.gz mv-ec5a06754164bb2f77d3627990f896c040fc1c76.tar.bz2 mv-ec5a06754164bb2f77d3627990f896c040fc1c76.tar.xz mv-ec5a06754164bb2f77d3627990f896c040fc1c76.zip |
Combine "Mod" and "Stop attack" keys.
Remove old "Mod" key because it conflicting with "Stop attack"
-rw-r--r-- | src/actionmanager.cpp | 2 | ||||
-rw-r--r-- | src/gui/setupactiondata.h | 8 | ||||
-rw-r--r-- | src/gui/windows/inventorywindow.cpp | 8 | ||||
-rw-r--r-- | src/input/keyboarddata.h | 4 | ||||
-rw-r--r-- | src/input/keydata.h | 2 |
5 files changed, 10 insertions, 14 deletions
diff --git a/src/actionmanager.cpp b/src/actionmanager.cpp index 878b5ab07..bc7be23a9 100644 --- a/src/actionmanager.cpp +++ b/src/actionmanager.cpp @@ -388,7 +388,7 @@ impHandler0(heal) { if (actorManager) { - if (inputManager.isActionActive(Input::KEY_MOD)) + if (inputManager.isActionActive(Input::KEY_STOP_ATTACK)) { Being *target = player_node->getTarget(); if (!target || target->getType() != ActorSprite::PLAYER) diff --git a/src/gui/setupactiondata.h b/src/gui/setupactiondata.h index b80052b30..2b9d694a8 100644 --- a/src/gui/setupactiondata.h +++ b/src/gui/setupactiondata.h @@ -96,7 +96,7 @@ static SetupActionData setupActionData0[] = }, { // TRANSLATORS: input action name - N_("Stop Attack"), + N_("Stop Attack / Modifier key"), Input::KEY_STOP_ATTACK, "", }, @@ -1368,12 +1368,6 @@ static SetupActionData setupActionData6[] = }, { // TRANSLATORS: input action name - N_("Modifier key"), - Input::KEY_MOD, - "", - }, - { - // TRANSLATORS: input action name N_("Show onscreen keyboard"), Input::KEY_SHOW_KEYBOARD, "", diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp index da91b84be..02b30aed7 100644 --- a/src/gui/windows/inventorywindow.cpp +++ b/src/gui/windows/inventorywindow.cpp @@ -425,7 +425,8 @@ void InventoryWindow::action(const gcn::ActionEvent &event) if (PlayerInfo::isItemProtected(item->getId())) return; - if (inputManager.isActionActive(static_cast<int>(Input::KEY_MOD))) + if (inputManager.isActionActive(static_cast<int>( + Input::KEY_STOP_ATTACK))) { PlayerInfo::dropItem(item, item->getQuantity(), true); } @@ -474,10 +475,11 @@ void InventoryWindow::mouseClicked(gcn::MouseEvent &event) gui->resetClickCount(); const bool mod = (isStorageActive() && inputManager.isActionActive( - static_cast<int>(Input::KEY_MOD))); + static_cast<int>(Input::KEY_STOP_ATTACK))); const bool mod2 = (tradeWindow && tradeWindow->isWindowVisible() - && inputManager.isActionActive(static_cast<int>(Input::KEY_MOD))); + && inputManager.isActionActive(static_cast<int>( + Input::KEY_STOP_ATTACK))); if (!mod && !mod2 && event.getButton() == gcn::MouseEvent::RIGHT) { diff --git a/src/input/keyboarddata.h b/src/input/keyboarddata.h index da0d22fee..c250b759e 100644 --- a/src/input/keyboarddata.h +++ b/src/input/keyboarddata.h @@ -1811,9 +1811,9 @@ static const KeyData keyData[Input::KEY_TOTAL] = { Input::KEY_NO_VALUE, 50, COND_GAME | COND_VALIDSPEED | COND_EMODS}, {"keyMod", - INPUT_KEYBOARD, SDLK_LSHIFT, INPUT_UNKNOWN, Input::KEY_NO_VALUE, - Input::GRP_GUI, + INPUT_UNKNOWN, Input::KEY_NO_VALUE, + 0, nullptr, Input::KEY_NO_VALUE, 50, COND_DEFAULT}, diff --git a/src/input/keydata.h b/src/input/keydata.h index 52bc7f6be..a0fb8341b 100644 --- a/src/input/keydata.h +++ b/src/input/keydata.h @@ -319,7 +319,7 @@ namespace Input KEY_AWAY, KEY_RIGHT_CLICK, KEY_CAMERA, - KEY_MOD, + KEY_RESERVED1, KEY_GUI_UP, KEY_GUI_DOWN, KEY_GUI_LEFT, |