summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-14 23:38:26 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-14 23:39:33 +0300
commit29155242c39c24c1f7d7d5dabc7d076693af4cb8 (patch)
treecc7702d0773ffa85e3946440654f235f3b40b2f7 /src
parent02f688326716e1f9a193f6f139021242241ad014 (diff)
downloadmv-29155242c39c24c1f7d7d5dabc7d076693af4cb8.tar.gz
mv-29155242c39c24c1f7d7d5dabc7d076693af4cb8.tar.bz2
mv-29155242c39c24c1f7d7d5dabc7d076693af4cb8.tar.xz
mv-29155242c39c24c1f7d7d5dabc7d076693af4cb8.zip
Remove "warp map" popup menu handler.
Diffstat (limited to 'src')
-rw-r--r--src/gui/popups/popupmenu.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index 0110ec012..a2d3ca3b1 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -613,7 +613,7 @@ void PopupMenu::showPopup(const int x, const int y, MapItem *const mapItem)
mBrowserBox->addRow("##3---");
// TRANSLATORS: popup menu item
// TRANSLATORS: warp to map item
- mBrowserBox->addRow("warp map", _("Warp"));
+ mBrowserBox->addRow("/warp 'MAPX' 'MAPY'", _("Warp"));
}
mBrowserBox->addRow("##3---");
// TRANSLATORS: popup menu item
@@ -638,7 +638,7 @@ void PopupMenu::showMapPopup(const int x, const int y,
{
// TRANSLATORS: popup menu item
// TRANSLATORS: warp to map item
- mBrowserBox->addRow("warp map", _("Warp"));
+ mBrowserBox->addRow("/warp 'MAPX' 'MAPY'", _("Warp"));
}
// TRANSLATORS: popup menu item
// TRANSLATORS: move to map item
@@ -1602,6 +1602,16 @@ void PopupMenu::handleLink(const std::string &link,
replaceAll(cmd, "'INVINDEX'", toString(mItem->getInvIndex()));
else
replaceAll(cmd, "'INVINDEX'", "0");
+ if (mMapItem)
+ {
+ replaceAll(cmd, "'MAPX'", toString(mMapItem->getX()));
+ replaceAll(cmd, "'MAPY'", toString(mMapItem->getY()));
+ }
+ else
+ {
+ replaceAll(cmd, "'MAPX'", toString(mX));
+ replaceAll(cmd, "'MAPY'", toString(mY));
+ }
const size_t pos = cmd.find(' ');
const std::string type(cmd, 0, pos);