diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-03-01 21:19:31 -0700 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-03-01 21:39:47 -0700 |
commit | d194ea8220658b6ef84522f01fa3cf0d0200545e (patch) | |
tree | 2e903d300b2f7d35177238276fe3663681b92053 /src | |
parent | 76b306a5a2eff9f9a6bb65b3d784cc8e31ba6cce (diff) | |
download | mana-d194ea8220658b6ef84522f01fa3cf0d0200545e.tar.gz mana-d194ea8220658b6ef84522f01fa3cf0d0200545e.tar.bz2 mana-d194ea8220658b6ef84522f01fa3cf0d0200545e.tar.xz mana-d194ea8220658b6ef84522f01fa3cf0d0200545e.zip |
Fix using custom cursors
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/viewport.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index a36f91cf..9633cbd5 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -468,8 +468,7 @@ void Viewport::mouseMoved(gcn::MouseEvent &event) const int y = (event.getY() + (int) mPixelViewY); mHoverBeing = beingManager->findBeingByPixel(x, y); - if (mHoverBeing && mHoverBeing->getType() == Being::PLAYER && - event.getSource() == this) + if (mHoverBeing && mHoverBeing->getType() == Being::PLAYER) mBeingPopup->show(getMouseX(), getMouseY(), static_cast<Player*>(mHoverBeing)); else @@ -478,6 +477,10 @@ void Viewport::mouseMoved(gcn::MouseEvent &event) mHoverItem = floorItemManager->findByCoordinates(x / mMap->getTileWidth(), y / mMap->getTileHeight()); + // Don't change the cursor if the mouse is over something else + if (event.getSource() != this) + return; + if (mHoverBeing) { switch (mHoverBeing->getType()) |