summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-01-27 19:37:07 +0300
committerAndrei Karas <akaras@inbox.ru>2016-01-27 19:41:51 +0300
commite05913dbd84ab444dcf41fcc00bf6aa5470d79fe (patch)
tree3cac4530f8ab7e5c9bb8def6ddfcae6bd604b042
parent1f90dd8fea01c835816b3ed67f07561ae29b6ddc (diff)
downloadmv-e05913dbd84ab444dcf41fcc00bf6aa5470d79fe.tar.gz
mv-e05913dbd84ab444dcf41fcc00bf6aa5470d79fe.tar.bz2
mv-e05913dbd84ab444dcf41fcc00bf6aa5470d79fe.tar.xz
mv-e05913dbd84ab444dcf41fcc00bf6aa5470d79fe.zip
Remove action "reset yellow bar" from context menu.
-rw-r--r--src/actions/actions.cpp6
-rw-r--r--src/actions/actions.h1
-rw-r--r--src/dyetool/actions/actions.cpp1
-rw-r--r--src/enums/input/inputaction.h1
-rw-r--r--src/gui/popups/popupmenu.cpp6
-rw-r--r--src/input/inputactionmap.h6
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