summaryrefslogtreecommitdiff
path: root/src/gui/popups/popupmenu.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-07 01:30:24 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-07 01:30:24 +0300
commita66df732580a488c92dd680e8b9e7fc965ea1318 (patch)
tree6a64ddd676c8c847fdece66ecbb1333a0f281040 /src/gui/popups/popupmenu.cpp
parent086356622db7b0734be68c58e064544fa243be1b (diff)
downloadmanaverse-a66df732580a488c92dd680e8b9e7fc965ea1318.tar.gz
manaverse-a66df732580a488c92dd680e8b9e7fc965ea1318.tar.bz2
manaverse-a66df732580a488c92dd680e8b9e7fc965ea1318.tar.xz
manaverse-a66df732580a488c92dd680e8b9e7fc965ea1318.zip
Add "Mail to..." command in player context menu.
Diffstat (limited to 'src/gui/popups/popupmenu.cpp')
-rw-r--r--src/gui/popups/popupmenu.cpp16
1 files changed, 16 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();