diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-25 13:54:01 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-25 13:54:01 +0300 |
commit | fabdb839728e5a625b67bae1f278952ddabb1844 (patch) | |
tree | 8af6017325cd8d6c003664e893d9f1fb03d53a00 /src/gui/popups | |
parent | 0ef4d8b885bf98735dbf800fc7385f625f18a9e4 (diff) | |
download | plus-fabdb839728e5a625b67bae1f278952ddabb1844.tar.gz plus-fabdb839728e5a625b67bae1f278952ddabb1844.tar.bz2 plus-fabdb839728e5a625b67bae1f278952ddabb1844.tar.xz plus-fabdb839728e5a625b67bae1f278952ddabb1844.zip |
Add in context menu for mercenary and homunculus command "move to master"
Diffstat (limited to 'src/gui/popups')
-rw-r--r-- | src/gui/popups/popupmenu.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
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(); |