diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-03-06 10:38:07 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-03-06 10:38:07 +0100 |
commit | 7cbdab589491e007adacd7597c769cdb9308a32c (patch) | |
tree | 0269c37cccbed49a1cb15db9de816f39ef549189 /src/gui/itemlinkhandler.cpp | |
parent | 616afb27c23def5661b3466d6fc86fd1c65c0082 (diff) | |
parent | aa4229cbb9f2b264ca96c3beedc66b1c79ccc1f5 (diff) | |
download | mana-7cbdab589491e007adacd7597c769cdb9308a32c.tar.gz mana-7cbdab589491e007adacd7597c769cdb9308a32c.tar.bz2 mana-7cbdab589491e007adacd7597c769cdb9308a32c.tar.xz mana-7cbdab589491e007adacd7597c769cdb9308a32c.zip |
Merge branch 'aethyra/master'
Conflicts:
src/being.cpp
src/being.h
src/floor_item.cpp
src/floor_item.h
src/flooritemmanager.cpp
src/gui/inventorywindow.cpp
src/gui/inventorywindow.h
src/gui/itemcontainer.cpp
src/gui/popupmenu.cpp
src/net/beinghandler.cpp
src/npc.cpp
Diffstat (limited to 'src/gui/itemlinkhandler.cpp')
-rw-r--r-- | src/gui/itemlinkhandler.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gui/itemlinkhandler.cpp b/src/gui/itemlinkhandler.cpp index 4060b303..bd8985dc 100644 --- a/src/gui/itemlinkhandler.cpp +++ b/src/gui/itemlinkhandler.cpp @@ -22,10 +22,9 @@ #include <sstream> #include <string> -#include <SDL_mouse.h> - #include "itemlinkhandler.h" #include "itempopup.h" +#include "viewport.h" #include "../resources/iteminfo.h" #include "../resources/itemdb.h" @@ -49,15 +48,12 @@ void ItemLinkHandler::handleLink(const std::string &link) if (id > 0) { const ItemInfo &iteminfo = ItemDB::get(id); - int mouseX, mouseY; - - SDL_GetMouseState(&mouseX, &mouseY); mItemPopup->setItem(iteminfo); if (mItemPopup->isVisible()) mItemPopup->setVisible(false); else - mItemPopup->view(mouseX, mouseY); + mItemPopup->view(viewport->getMouseX(), viewport->getMouseY()); } } |