diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-01-27 19:37:07 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-01-27 19:41:51 +0300 |
commit | e05913dbd84ab444dcf41fcc00bf6aa5470d79fe (patch) | |
tree | 3cac4530f8ab7e5c9bb8def6ddfcae6bd604b042 /src | |
parent | 1f90dd8fea01c835816b3ed67f07561ae29b6ddc (diff) | |
download | plus-e05913dbd84ab444dcf41fcc00bf6aa5470d79fe.tar.gz plus-e05913dbd84ab444dcf41fcc00bf6aa5470d79fe.tar.bz2 plus-e05913dbd84ab444dcf41fcc00bf6aa5470d79fe.tar.xz plus-e05913dbd84ab444dcf41fcc00bf6aa5470d79fe.zip |
Remove action "reset yellow bar" from context menu.
Diffstat (limited to 'src')
-rw-r--r-- | src/actions/actions.cpp | 6 | ||||
-rw-r--r-- | src/actions/actions.h | 1 | ||||
-rw-r--r-- | src/dyetool/actions/actions.cpp | 1 | ||||
-rw-r--r-- | src/enums/input/inputaction.h | 1 | ||||
-rw-r--r-- | src/gui/popups/popupmenu.cpp | 6 | ||||
-rw-r--r-- | src/input/inputactionmap.h | 6 |
6 files changed, 16 insertions, 5 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp index 77da32cd4..a8a6e3c95 100644 --- a/src/actions/actions.cpp +++ b/src/actions/actions.cpp @@ -1703,4 +1703,10 @@ impHandler(craftKey) return false; } +impHandler0(resetGameModifiers) +{ + GameModifiers::resetModifiers(); + return true; +} + } // namespace Actions diff --git a/src/actions/actions.h b/src/actions/actions.h index 712017bd0..a19b4964e 100644 --- a/src/actions/actions.h +++ b/src/actions/actions.h @@ -110,6 +110,7 @@ namespace Actions decHandler(clearDrop); decHandler(testInfo); decHandler(craftKey); + decHandler(resetGameModifiers); } // namespace Actions #undef decHandler diff --git a/src/dyetool/actions/actions.cpp b/src/dyetool/actions/actions.cpp index 35c9d8d45..f5db2686a 100644 --- a/src/dyetool/actions/actions.cpp +++ b/src/dyetool/actions/actions.cpp @@ -107,5 +107,6 @@ impHandlerVoid(kick) impHandlerVoid(clearDrop) impHandlerVoid(testInfo) impHandlerVoid(craftKey) +impHandlerVoid(resetGameModifiers) } // namespace Actions diff --git a/src/enums/input/inputaction.h b/src/enums/input/inputaction.h index 52fd75068..7c88a9b93 100644 --- a/src/enums/input/inputaction.h +++ b/src/enums/input/inputaction.h @@ -622,6 +622,7 @@ enumStart(InputAction) ADD_PICKUP, REMOVE_PICKUP, IGNORE_PICKUP, + RESET_MODIFIERS, TOTAL } enumEnd(InputAction); diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index bc8a9fd2f..d5b122ffd 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -1264,10 +1264,6 @@ void PopupMenu::handleLink(const std::string &link, } } } - else if (link == "reset yellow") - { - GameModifiers::resetModifiers(); - } else if (link == "bar to chat" && !mNick.empty()) { if (chatWindow) @@ -1964,7 +1960,7 @@ void PopupMenu::showPopup(const int x, const int y, const ProgressBar *const b) // TRANSLATORS: popup menu item mBrowserBox->addRow("/yellowbar", _("Open yellow bar settings")); // TRANSLATORS: popup menu item - mBrowserBox->addRow("reset yellow", _("Reset yellow bar")); + mBrowserBox->addRow("/resetmodifiers", _("Reset yellow bar")); mBrowserBox->addRow("##3---"); // TRANSLATORS: popup menu item // TRANSLATORS: copy status to chat diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h index 586557c0e..f18a0af2f 100644 --- a/src/input/inputactionmap.h +++ b/src/input/inputactionmap.h @@ -5221,6 +5221,12 @@ static const InputActionData inputActionData "ignorepickup|pickupignore", UseArgs_true, Protected_true}, + {"keyResetModifiers", + defaultAction(&Actions::resetGameModifiers), + InputCondition::INGAME, + "resetyellowbar|resetmodifiers|resetgamemodifiers", + UseArgs_false, + Protected_true}, }; #undef defaultAction |