summaryrefslogtreecommitdiff
path: root/src/gui/viewport.cpp
diff options
context:
space:
mode:
authorTametomo <irarice@gmail.com>2009-04-15 19:55:29 +0200
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-04-15 19:57:02 +0200
commit5f00b25ba2895704123eb3d01b3ab5d012d2f333 (patch)
tree5f94b0a8b54c8a2200c1fe568917f06551208b07 /src/gui/viewport.cpp
parentef13037435c671b76c75c3ecefbad83dbdc578f2 (diff)
downloadmana-5f00b25ba2895704123eb3d01b3ab5d012d2f333.tar.gz
mana-5f00b25ba2895704123eb3d01b3ab5d012d2f333.tar.bz2
mana-5f00b25ba2895704123eb3d01b3ab5d012d2f333.tar.xz
mana-5f00b25ba2895704123eb3d01b3ab5d012d2f333.zip
Some PopupMenu cleanups/fixes and additions.
Signed-off-by: Tametomo <irarice@gmail.com> Signed-off-by: Bjørn Lindeijer <bjorn@lindeijer.nl>
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r--src/gui/viewport.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 3fc5f2d4..9ce537fc 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -313,8 +313,8 @@ void Viewport::mousePressed(gcn::MouseEvent &event)
if ((being = beingManager->findBeingByPixel(pixelx, pixely)) &&
being != player_node)
{
- mPopupMenu->showPopup(event.getX(), event.getY(), being);
- return;
+ mPopupMenu->showPopup(event.getX(), event.getY(), being);
+ return;
}
else if ((floorItem = floorItemManager->findByCoordinates(tilex,
tiley)))
@@ -446,6 +446,11 @@ void Viewport::showPopup(int x, int y, Item *item)
mPopupMenu->showPopup(x, y, item);
}
+void Viewport::closePopupMenu()
+{
+ mPopupMenu->handleLink("cancel");
+}
+
void Viewport::optionChanged(const std::string &name)
{
mScrollLaziness = (int) config.getValue("ScrollLaziness", 32);