summaryrefslogtreecommitdiff
path: root/src/gui/popups/popupmenu.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-10 21:34:14 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-10 21:34:14 +0300
commitcb6f070779f94f3d69ba7576affb0588b61e7b7c (patch)
tree2ae6218ffff3691ca883de66007a4cd3b833bf5c /src/gui/popups/popupmenu.cpp
parentb7d3acab99fe4975d4598b6c9ac1ad88edfa8506 (diff)
downloadmanaverse-cb6f070779f94f3d69ba7576affb0588b61e7b7c.tar.gz
manaverse-cb6f070779f94f3d69ba7576affb0588b61e7b7c.tar.bz2
manaverse-cb6f070779f94f3d69ba7576affb0588b61e7b7c.tar.xz
manaverse-cb6f070779f94f3d69ba7576affb0588b61e7b7c.zip
Add close to minimap context menu.
Diffstat (limited to 'src/gui/popups/popupmenu.cpp')
-rw-r--r--src/gui/popups/popupmenu.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index 71a6d81d5..d9d3999c1 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -41,10 +41,12 @@
#include "gui/buttontext.h"
#include "gui/gui.h"
#include "gui/viewport.h"
+#include "gui/windowmenu.h"
#include "gui/windows/chatwindow.h"
#include "gui/windows/equipmentwindow.h"
#include "gui/windows/inventorywindow.h"
+#include "gui/windows/minimap.h"
#include "gui/windows/ministatuswindow.h"
#include "gui/windows/npcdialog.h"
#include "gui/windows/outfitwindow.h"
@@ -52,7 +54,6 @@
#include "gui/windows/textcommandeditor.h"
#include "gui/windows/textdialog.h"
#include "gui/windows/tradewindow.h"
-#include "gui/windowmenu.h"
#include "gui/widgets/button.h"
#include "gui/widgets/createwidget.h"
@@ -638,11 +639,15 @@ void PopupMenu::showPopup(const int x, const int y, MapItem *const mapItem)
}
void PopupMenu::showMapPopup(const int x, const int y,
- const int x2, const int y2)
+ const int x2, const int y2,
+ const bool isMinimap)
{
mX = x2;
mY = y2;
+ if (isMinimap)
+ mWindow = minimap;
+
mBrowserBox->clearRows();
// TRANSLATORS: popup menu header
@@ -661,6 +666,12 @@ void PopupMenu::showMapPopup(const int x, const int y,
// TRANSLATORS: move camera to map item
mBrowserBox->addRow("/movecamera 'X' 'Y'", _("Move camera"));
mBrowserBox->addRow("##3---");
+ if (isMinimap)
+ {
+ // TRANSLATORS: popup menu item
+ mBrowserBox->addRow("window close", _("Close"));
+ }
+ mBrowserBox->addRow("##3---");
// TRANSLATORS: popup menu item
// TRANSLATORS: close menu
mBrowserBox->addRow("cancel", _("Cancel"));