From 4406b2fd90a5d4656bc923bf5c751e4c5250a0d2 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Mon, 22 Feb 2010 00:02:09 -0700 Subject: Cleanup some popup-related code and make sure BeingPopup is included --- src/gui/itempopup.cpp | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'src/gui/itempopup.cpp') diff --git a/src/gui/itempopup.cpp b/src/gui/itempopup.cpp index a24d3a75..c22a9c33 100644 --- a/src/gui/itempopup.cpp +++ b/src/gui/itempopup.cpp @@ -166,23 +166,6 @@ gcn::Color ItemPopup::getColor(ItemType type) } } -void ItemPopup::view(int x, int y) -{ - const int distance = 20; - - int posX = std::max(0, x - getWidth() / 2); - int posY = y + distance; - - if (posX > graphics->getWidth() - getWidth()) - posX = graphics->getWidth() - getWidth(); - if (posY > graphics->getHeight() - getHeight()) - posY = y - getHeight() - distance; - - setPosition(posX, posY); - setVisible(true); - requestMoveToTop(); -} - void ItemPopup::mouseMoved(gcn::MouseEvent &event) { // When the mouse moved on top of the popup, hide it -- cgit v1.2.3-70-g09d2