summaryrefslogtreecommitdiff
path: root/src/gui/popups/popupmenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/popups/popupmenu.cpp')
-rw-r--r--src/gui/popups/popupmenu.cpp98
1 files changed, 98 insertions, 0 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index fc3a52a77..0630e7844 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -3390,6 +3390,103 @@ void PopupMenu::showAdoptCommands()
mBrowserBox->addRow("/adoptchild 'NAME'", _("Adopt child"));
}
+void PopupMenu::addSocialMenu()
+{
+ mBrowserBox->clearRows();
+ setMousePos();
+ const Party *const party = localPlayer->getParty();
+ if (party)
+ {
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: leave party
+ mBrowserBox->addRow("/leaveparty", _("Leave party"));
+ }
+ else
+ {
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: create party
+ mBrowserBox->addRow("/createparty", _("Create party"));
+ }
+ const Guild *const guild = localPlayer->getGuild();
+ if (!guild)
+ {
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: create guild
+ mBrowserBox->addRow("/createguild", _("Create guild"));
+ }
+ mBrowserBox->addRow("##3---");
+}
+
+void PopupMenu::showPartyPopup()
+{
+ addSocialMenu();
+
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: close menu
+ mBrowserBox->addRow("cancel", _("Cancel"));
+ showPopup(mX, mY);
+}
+
+void PopupMenu::showGuildPopup()
+{
+ addSocialMenu();
+
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: close menu
+ mBrowserBox->addRow("cancel", _("Cancel"));
+ showPopup(mX, mY);
+}
+
+void PopupMenu::showAttackPopup()
+{
+ addSocialMenu();
+
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: close menu
+ mBrowserBox->addRow("cancel", _("Cancel"));
+ showPopup(mX, mY);
+}
+
+void PopupMenu::showNavigationPopup()
+{
+ addSocialMenu();
+
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: close menu
+ mBrowserBox->addRow("cancel", _("Cancel"));
+ showPopup(mX, mY);
+}
+
+void PopupMenu::showPickupPopup()
+{
+ addSocialMenu();
+
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: close menu
+ mBrowserBox->addRow("cancel", _("Cancel"));
+ showPopup(mX, mY);
+}
+
+void PopupMenu::showPlayersPopup()
+{
+ addSocialMenu();
+
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: close menu
+ mBrowserBox->addRow("cancel", _("Cancel"));
+ showPopup(mX, mY);
+}
+
+void PopupMenu::showFriendsPopup()
+{
+ addSocialMenu();
+
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: close menu
+ mBrowserBox->addRow("cancel", _("Cancel"));
+ showPopup(mX, mY);
+}
+
void PopupMenu::moveUp()
{
mBrowserBox->moveSelectionUp();
@@ -3402,5 +3499,6 @@ void PopupMenu::moveDown()
void PopupMenu::select()
{
+
mBrowserBox->selectSelection();
}