summaryrefslogtreecommitdiff
path: root/src/gui/itemlinkhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/itemlinkhandler.cpp')
-rw-r--r--src/gui/itemlinkhandler.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gui/itemlinkhandler.cpp b/src/gui/itemlinkhandler.cpp
index 4a64d53f..06263ce2 100644
--- a/src/gui/itemlinkhandler.cpp
+++ b/src/gui/itemlinkhandler.cpp
@@ -23,10 +23,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"
@@ -50,15 +49,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());
}
}