diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-01-27 19:49:56 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-01-27 19:49:56 +0300 |
commit | dccf40b1e9168e5341937f35cc8c9bfa1bee433f (patch) | |
tree | 6e8ee1169e0b63e65b358decae05145fe4f8217e | |
parent | e05913dbd84ab444dcf41fcc00bf6aa5470d79fe (diff) | |
download | ManaVerse-dccf40b1e9168e5341937f35cc8c9bfa1bee433f.tar.gz ManaVerse-dccf40b1e9168e5341937f35cc8c9bfa1bee433f.tar.bz2 ManaVerse-dccf40b1e9168e5341937f35cc8c9bfa1bee433f.tar.xz ManaVerse-dccf40b1e9168e5341937f35cc8c9bfa1bee433f.zip |
Remove popup action "copy bar to chat"
-rw-r--r-- | src/actions/actions.cpp | 10 | ||||
-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 | 7 | ||||
-rw-r--r-- | src/input/inputactionmap.h | 6 |
6 files changed, 20 insertions, 6 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp index a8a6e3c95..169727b2a 100644 --- a/src/actions/actions.cpp +++ b/src/actions/actions.cpp @@ -1709,4 +1709,14 @@ impHandler0(resetGameModifiers) return true; } +impHandler(barToChat) +{ + if (chatWindow) + { + chatWindow->addInputText(event.args); + return true; + } + return false; +} + } // namespace Actions diff --git a/src/actions/actions.h b/src/actions/actions.h index a19b4964e..5581fee52 100644 --- a/src/actions/actions.h +++ b/src/actions/actions.h @@ -111,6 +111,7 @@ namespace Actions decHandler(testInfo); decHandler(craftKey); decHandler(resetGameModifiers); + decHandler(barToChat); } // namespace Actions #undef decHandler diff --git a/src/dyetool/actions/actions.cpp b/src/dyetool/actions/actions.cpp index f5db2686a..834f7d2f9 100644 --- a/src/dyetool/actions/actions.cpp +++ b/src/dyetool/actions/actions.cpp @@ -108,5 +108,6 @@ impHandlerVoid(clearDrop) impHandlerVoid(testInfo) impHandlerVoid(craftKey) impHandlerVoid(resetGameModifiers) +impHandlerVoid(barToChat) } // namespace Actions diff --git a/src/enums/input/inputaction.h b/src/enums/input/inputaction.h index 7c88a9b93..f6837109e 100644 --- a/src/enums/input/inputaction.h +++ b/src/enums/input/inputaction.h @@ -623,6 +623,7 @@ enumStart(InputAction) REMOVE_PICKUP, IGNORE_PICKUP, RESET_MODIFIERS, + BAR_TO_CHAT, TOTAL } enumEnd(InputAction); diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index d5b122ffd..bead76de5 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -1264,11 +1264,6 @@ void PopupMenu::handleLink(const std::string &link, } } } - else if (link == "bar to chat" && !mNick.empty()) - { - if (chatWindow) - chatWindow->addInputText(mNick); - } else if (link == "items" && being) { if (being == localPlayer) @@ -1964,7 +1959,7 @@ void PopupMenu::showPopup(const int x, const int y, const ProgressBar *const b) mBrowserBox->addRow("##3---"); // TRANSLATORS: popup menu item // TRANSLATORS: copy status to chat - mBrowserBox->addRow("bar to chat", _("Copy to chat")); + mBrowserBox->addRow("/bartochat 'NAME'", _("Copy to chat")); // TRANSLATORS: popup menu item // TRANSLATORS: close menu mBrowserBox->addRow("cancel", _("Cancel")); diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h index f18a0af2f..b8f89c7cd 100644 --- a/src/input/inputactionmap.h +++ b/src/input/inputactionmap.h @@ -5227,6 +5227,12 @@ static const InputActionData inputActionData "resetyellowbar|resetmodifiers|resetgamemodifiers", UseArgs_false, Protected_true}, + {"keyBarToChat", + defaultAction(&Actions::barToChat), + InputCondition::INGAME, + "bartochat", + UseArgs_true, + Protected_true}, }; #undef defaultAction |