diff options
author | jak1 <mike.wollmann@gmail.com> | 2020-11-03 23:14:45 +0000 |
---|---|---|
committer | jak1 <mike.wollmann@gmail.com> | 2021-03-12 05:16:44 +0000 |
commit | 9488e6a43b9d016a9b5f2e003ff927cc1bf11a4b (patch) | |
tree | 5ecadb2accc2683a21aedd3a536fcf8cd0d521ad /src/gui/popups/popupmenu.cpp | |
parent | e580ef08d69268ee53cca8a91949adf436e800cc (diff) | |
download | manaverse-9488e6a43b9d016a9b5f2e003ff927cc1bf11a4b.tar.gz manaverse-9488e6a43b9d016a9b5f2e003ff927cc1bf11a4b.tar.bz2 manaverse-9488e6a43b9d016a9b5f2e003ff927cc1bf11a4b.tar.xz manaverse-9488e6a43b9d016a9b5f2e003ff927cc1bf11a4b.zip |
Popup remove unusable entries
Diffstat (limited to 'src/gui/popups/popupmenu.cpp')
-rw-r--r-- | src/gui/popups/popupmenu.cpp | 66 |
1 files changed, 43 insertions, 23 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index 6ecbd6a9f..a4d217f6e 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -229,18 +229,22 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being) { case ActorType::Player: { - // TRANSLATORS: popup menu item - // TRANSLATORS: trade with player - mBrowserBox->addRow("/trade 'NAME'", _("Trade")); - // TRANSLATORS: popup menu item - // TRANSLATORS: trade attack player - mBrowserBox->addRow("/attack 'NAME'", _("Attack")); - // TRANSLATORS: popup menu item - // TRANSLATORS: send whisper to player - mBrowserBox->addRow("/whispertext 'NAME'", _("Whisper")); - addMailCommands(); + if (being != localPlayer) + { + // TRANSLATORS: popup menu item + // TRANSLATORS: trade with player + mBrowserBox->addRow("/trade 'NAME'", _("Trade")); + // TRANSLATORS: popup menu item + // TRANSLATORS: trade attack player + mBrowserBox->addRow("/attack 'NAME'", _("Attack")); + // TRANSLATORS: popup menu item + // TRANSLATORS: send whisper to player + mBrowserBox->addRow("/whispertext 'NAME'", _("Whisper")); + addMailCommands(); + } addGmCommands(); - mBrowserBox->addSeparator("##3---"); + if (being != localPlayer) + mBrowserBox->addSeparator("##3---"); #ifdef TMWA_SUPPORT if (Net::getNetworkType() == ServerType::TMWATHENA) @@ -252,10 +256,13 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being) } #endif // TMWA_SUPPORT - addPlayerRelation(name); - mBrowserBox->addSeparator("##3---"); + if (being != localPlayer) + { + addPlayerRelation(name); + mBrowserBox->addSeparator("##3---"); - addFollow(); + addFollow(); + } addPartyName(being->getPartyName()); const Guild *const guild1 = being->getGuild(); @@ -266,10 +273,20 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being) { if (guild1->getId() == guild2->getId()) { - mBrowserBox->addRow("/kickguild 'NAME'", + if (being != localPlayer) + { + mBrowserBox->addRow("/kickguild 'NAME'", // TRANSLATORS: popup menu item // TRANSLATORS: kick player from guild _("Kick from guild")); + } + else + { + mBrowserBox->addRow("/kickguild 'NAME'", + // TRANSLATORS: popup menu item + // TRANSLATORS: leave guild + _("Leave guild")); + } if (guild2->getServerGuild()) { mBrowserBox->addRow(strprintf( @@ -312,14 +329,17 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being) } } - // TRANSLATORS: popup menu item - // TRANSLATORS: set player invisible for self by id - mBrowserBox->addRow("/nuke 'NAME'", _("Nuke")); - // TRANSLATORS: popup menu item - // TRANSLATORS: move to player location - mBrowserBox->addRow("/navigateto 'NAME'", _("Move")); - addPlayerMisc(); - addBuySell(being); + if (being != localPlayer) + { + // TRANSLATORS: popup menu item + // TRANSLATORS: set player invisible for self by id + mBrowserBox->addRow("/nuke 'NAME'", _("Nuke")); + // TRANSLATORS: popup menu item + // TRANSLATORS: move to player location + mBrowserBox->addRow("/navigateto 'NAME'", _("Move")); + addPlayerMisc(); + addBuySell(being); + } addChat(being); break; } |