diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-06-12 23:45:14 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-06-13 12:49:24 +0300 |
commit | 24f4c6de03a3a65df1ad9100e912e968fe9b8b18 (patch) | |
tree | d1a858ac91f493d97334499c4056abfb044501cd /src/gui/popupmenu.cpp | |
parent | 9233c3936657f6dc4ca9c73d84ea8c045b3fc09d (diff) | |
download | manaverse-24f4c6de03a3a65df1ad9100e912e968fe9b8b18.tar.gz manaverse-24f4c6de03a3a65df1ad9100e912e968fe9b8b18.tar.bz2 manaverse-24f4c6de03a3a65df1ad9100e912e968fe9b8b18.tar.xz manaverse-24f4c6de03a3a65df1ad9100e912e968fe9b8b18.zip |
add copy to clipboard in npc dialog.
Diffstat (limited to 'src/gui/popupmenu.cpp')
-rw-r--r-- | src/gui/popupmenu.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp index 91bf514a3..b6272a4e4 100644 --- a/src/gui/popupmenu.cpp +++ b/src/gui/popupmenu.cpp @@ -44,6 +44,7 @@ #include "gui/inventorywindow.h" #include "gui/itemamountwindow.h" #include "gui/ministatuswindow.h" +#include "gui/npcdialog.h" #include "gui/outfitwindow.h" #include "gui/selldialog.h" #include "gui/skilldialog.h" @@ -1352,6 +1353,10 @@ void PopupMenu::handleLink(const std::string &link, if (chatWindow) chatWindow->copyToClipboard(mX, mY); } + else if (link == "npc clipboard" && mBeingId) + { + NpcDialog::copyToClipboard(mBeingId, mX, mY); + } else if (link == "remove attack" && being) { if (actorSpriteManager && being->getType() == Being::MONSTER) @@ -2366,6 +2371,21 @@ void PopupMenu::showWindowsPopup(const int x, const int y) showPopup(x, y); } +void PopupMenu::showNpcDialogPopup(const int npcId, const int x, const int y) +{ + mBeingId = npcId; + mX = x; + mY = y; + mBrowserBox->clearRows(); + // TRANSLATORS: popup menu item + mBrowserBox->addRow("npc clipboard", _("Copy to clipboard")); + mBrowserBox->addRow("##3---"); + // TRANSLATORS: popup menu item + mBrowserBox->addRow("cancel", _("Cancel")); + + showPopup(x, y); +} + void PopupMenu::showPopup(int x, int y) { const int pad2 = 2 * mPadding; |