summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/popups/popupmenu.cpp16
-rw-r--r--src/gui/popups/popupmenu.h2
2 files changed, 18 insertions, 0 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index 264b2a6cb..e87407260 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -178,6 +178,7 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being)
// TRANSLATORS: popup menu item
// TRANSLATORS: send whisper to player
mBrowserBox->addRow("/whispertext 'NAME'", _("Whisper"));
+ addMailCommands();
addGmCommands();
mBrowserBox->addRow("##3---");
@@ -505,6 +506,7 @@ void PopupMenu::showPlayerPopup(const std::string &nick)
// TRANSLATORS: popup menu item
// TRANSLATORS: send whisper to player
mBrowserBox->addRow("/whispertext 'NAME'", _("Whisper"));
+ addMailCommands();
addGmCommands();
mBrowserBox->addRow("##3---");
@@ -866,6 +868,7 @@ void PopupMenu::showChatPopup(const int x, const int y, ChatTab *const tab)
// TRANSLATORS: popup menu item
// TRANSLATORS: attack player
mBrowserBox->addRow("/attack 'NAME'", _("Attack"));
+ addMailCommands();
mBrowserBox->addRow("##3---");
// TRANSLATORS: popup menu item
// TRANSLATORS: heal player
@@ -932,6 +935,7 @@ void PopupMenu::showChatPopup(const int x, const int y, ChatTab *const tab)
mSubType = BeingTypeId_zero;
addPlayerRelation(name);
mBrowserBox->addRow("##3---");
+ addMailCommands();
addFollow();
if (localPlayer->isInParty())
@@ -3138,6 +3142,18 @@ void PopupMenu::showCraftPopup()
}
#endif
+void PopupMenu::addMailCommands()
+{
+#ifdef EATHENA_SUPPORT
+ if (!serverFeatures->haveMail())
+ return;
+
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: open mail dialog
+ mBrowserBox->addRow("/mailto 'NAME'", _("Mail to..."));
+#endif
+}
+
void PopupMenu::moveUp()
{
mBrowserBox->moveSelectionUp();
diff --git a/src/gui/popups/popupmenu.h b/src/gui/popups/popupmenu.h
index ad4c943b8..2bf253a29 100644
--- a/src/gui/popups/popupmenu.h
+++ b/src/gui/popups/popupmenu.h
@@ -229,6 +229,8 @@ class PopupMenu final : public Popup, public LinkHandler
void addChat(const Being *const being);
#endif
+ void addMailCommands();
+
void showGMPopup(const std::string &name);
void showPlayerGMCommands(const std::string &name);