From 927c411f815131a03eea065231d043692465c573 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 13 Jul 2011 12:38:09 +0300 Subject: Close popup menu by quit key (ESC). --- src/gui/viewport.cpp | 5 +++++ src/gui/viewport.h | 2 ++ 2 files changed, 7 insertions(+) (limited to 'src/gui') diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index 79e536c2f..ba8414699 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -819,3 +819,8 @@ void Viewport::moveCamera(int dx, int dy) mCameraRelativeX += dx; mCameraRelativeY += dy; } + +bool Viewport::isPopupMenuVisible() +{ + return mPopupMenu ? mPopupMenu->isVisible() : false; +} diff --git a/src/gui/viewport.h b/src/gui/viewport.h index 6657b98f3..d6ee54834 100644 --- a/src/gui/viewport.h +++ b/src/gui/viewport.h @@ -254,6 +254,8 @@ class Viewport : public WindowContainer, public gcn::MouseListener, int getCameraRelativeY() { return mCameraRelativeY; } + bool isPopupMenuVisible(); + protected: friend class ActorSpriteManager; -- cgit v1.2.3-70-g09d2