summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/popups/popupmenu.cpp14
-rw-r--r--src/gui/popups/popupmenu.h2
2 files changed, 16 insertions, 0 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index 811efc881..1ab1f4243 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -565,6 +565,7 @@ void PopupMenu::showPlayerPopup(const std::string &nick)
mBrowserBox->addRow("##3---");
const PartyMember *const o = party->getMember(
localPlayer->getName());
+ showAdoptCommands();
if (o && member->getMap() == o->getMap())
{
// TRANSLATORS: popup menu item
@@ -2568,6 +2569,7 @@ void PopupMenu::addPartyName(const std::string &partyName)
// TRANSLATORS: popup menu item
// TRANSLATORS: kick player from party
mBrowserBox->addRow("/kickparty 'NAME'", _("Kick from party"));
+ showAdoptCommands();
}
mBrowserBox->addRow("##3---");
}
@@ -2592,6 +2594,7 @@ void PopupMenu::addParty(const std::string &nick)
// TRANSLATORS: popup menu item
// TRANSLATORS: kick player from party
mBrowserBox->addRow("/kickparty 'NAME'", _("Kick from party"));
+ showAdoptCommands();
}
mBrowserBox->addRow("##3---");
}
@@ -3198,6 +3201,17 @@ void PopupMenu::addCatchPetCommands()
#endif
}
+void PopupMenu::showAdoptCommands()
+{
+#ifdef EATHENA_SUPPORT
+ if (!serverFeatures->haveFamily())
+ return;
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: adopt child command
+ mBrowserBox->addRow("/adoptchild 'NAME'", _("Adopt child"));
+#endif
+}
+
void PopupMenu::moveUp()
{
mBrowserBox->moveSelectionUp();
diff --git a/src/gui/popups/popupmenu.h b/src/gui/popups/popupmenu.h
index 5f4f6be70..b69a0f588 100644
--- a/src/gui/popups/popupmenu.h
+++ b/src/gui/popups/popupmenu.h
@@ -241,6 +241,8 @@ class PopupMenu final : public Popup, public LinkHandler
void showMonsterGMCommands();
+ void showAdoptCommands();
+
bool addBeingMenu();
BrowserBox *mBrowserBox A_NONNULLPOINTER;