diff options
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; |