diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-02-03 00:44:56 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-02-03 00:48:45 +0200 |
commit | 0d3374e02d07a99f7d32660a9d26960005f7bf95 (patch) | |
tree | 3eb225cfabce6dda490a14802495d865ce7af8df /src/gui/viewport.cpp | |
parent | 325ddf31483ced5444aa7bde38cc41ac8d3f04c2 (diff) | |
download | mv-0d3374e02d07a99f7d32660a9d26960005f7bf95.tar.gz mv-0d3374e02d07a99f7d32660a9d26960005f7bf95.tar.bz2 mv-0d3374e02d07a99f7d32660a9d26960005f7bf95.tar.xz mv-0d3374e02d07a99f7d32660a9d26960005f7bf95.zip |
Add option to enable\disable player popups.
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r-- | src/gui/viewport.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index 9458ea911..11918f0b7 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -57,8 +57,6 @@ Viewport::Viewport(): mMouseY(0), mPixelViewX(0.0f), mPixelViewY(0.0f), -// mTileViewX(0), -// mTileViewY(0), mShowDebugPath(false), mCameraMode(0), mPlayerFollowMouse(false), @@ -76,9 +74,11 @@ Viewport::Viewport(): mScrollRadius = config.getIntValue("ScrollRadius"); mScrollCenterOffsetX = config.getIntValue("ScrollCenterOffsetX"); mScrollCenterOffsetY = config.getIntValue("ScrollCenterOffsetY"); + mShowBeingPopup = config.getBoolValue("showBeingPopup"); config.addListener("ScrollLaziness", this); config.addListener("ScrollRadius", this); + config.addListener("showBeingPopup", this); mPopupMenu = new PopupMenu; mBeingPopup = new BeingPopup; @@ -91,6 +91,7 @@ Viewport::~Viewport() { config.removeListener("ScrollLaziness", this); config.removeListener("ScrollRadius", this); + config.removeListener("showBeingPopup", this); delete mPopupMenu; mPopupMenu = 0; @@ -620,6 +621,7 @@ void Viewport::optionChanged(const std::string &name _UNUSED_) { mScrollLaziness = config.getIntValue("ScrollLaziness"); mScrollRadius = config.getIntValue("ScrollRadius"); + mShowBeingPopup = config.getBoolValue("showBeingPopup"); } void Viewport::mouseMoved(gcn::MouseEvent &event _UNUSED_) @@ -635,7 +637,8 @@ void Viewport::mouseMoved(gcn::MouseEvent &event _UNUSED_) if (mHoverBeing && mHoverBeing->getType() == Being::PLAYER) { mTextPopup->setVisible(false); - mBeingPopup->show(getMouseX(), getMouseY(), mHoverBeing); + if (mShowBeingPopup) + mBeingPopup->show(getMouseX(), getMouseY(), mHoverBeing); } else { |