summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/viewport.cpp6
-rw-r--r--src/gui/viewport.h7
2 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 1451b935..9befac9d 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -509,3 +509,9 @@ void Viewport::hideBeingPopup()
{
mBeingPopup->setVisible(false);
}
+
+void Viewport::clearHoverBeing(Being *being)
+{
+ if (mHoverBeing == being)
+ mHoverBeing = 0;
+}
diff --git a/src/gui/viewport.h b/src/gui/viewport.h
index e4944cd6..e67cc6d3 100644
--- a/src/gui/viewport.h
+++ b/src/gui/viewport.h
@@ -22,6 +22,7 @@
#ifndef VIEWPORT_H
#define VIEWPORT_H
+#include "beingmanager.h"
#include "configlistener.h"
#include "position.h"
@@ -157,6 +158,12 @@ class Viewport : public WindowContainer, public gcn::MouseListener,
*/
void hideBeingPopup();
+ protected:
+ friend class BeingManager;
+
+ /// Clears the hovered being if it matches
+ void clearHoverBeing(Being *being);
+
private:
/**
* Finds a path from the player to the mouse, and draws it. This is for