From fabdb839728e5a625b67bae1f278952ddabb1844 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 25 Sep 2014 13:54:01 +0300 Subject: Add in context menu for mercenary and homunculus command "move to master" --- src/gui/popups/popupmenu.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src') diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index ab50d8701..a33de2b83 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -70,6 +70,7 @@ #include "net/buysellhandler.h" #include "net/chathandler.h" #include "net/guildhandler.h" +#include "net/homunculushandler.h" #include "net/inventoryhandler.h" #include "net/mercenaryhandler.h" #include "net/net.h" @@ -306,10 +307,17 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being) case ActorType::Mercenary: // TRANSLATORS: popup menu item // TRANSLATORS: fire mercenary + mBrowserBox->addRow("mercenary to master", _("Move to master")); + mBrowserBox->addRow("##3---"); mBrowserBox->addRow("fire mercenary", _("Fire")); mBrowserBox->addRow("##3---"); break; + case ActorType::Homunculus: + mBrowserBox->addRow("homunculus to master", _("Move to master")); + mBrowserBox->addRow("##3---"); + break; + case ActorType::Pet: // TRANSLATORS: popup menu item // TRANSLATORS: feed pet @@ -1858,6 +1866,14 @@ void PopupMenu::handleLink(const std::string &link, { mercenaryHandler->fire(); } + else if (link == "mercenary to master") + { + mercenaryHandler->moveToMaster(); + } + else if (link == "homunculus to master") + { + homunculusHandler->moveToMaster(); + } else if (link == "pet feed") { petHandler->feed(); -- cgit v1.2.3-70-g09d2