summaryrefslogtreecommitdiff
path: root/src/gui/inventorywindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/inventorywindow.cpp')
-rw-r--r--src/gui/inventorywindow.cpp25
1 files changed, 2 insertions, 23 deletions
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index da391a7b..6e5ae84a 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -82,6 +82,7 @@ InventoryWindow::InventoryWindow():
mUseButton->setSize(48, mUseButton->getHeight());
+ addWindowListener(this);
loadWindowState();
}
@@ -175,17 +176,7 @@ void InventoryWindow::mouseClicked(gcn::MouseEvent &event)
}
}
-void InventoryWindow::mouseDragged(gcn::MouseEvent &event)
-{
- int tmpWidth = getWidth(), tmpHeight = getHeight();
- Window::mouseDragged(event);
- if (getWidth() != tmpWidth || getHeight() != tmpHeight)
- {
- updateWidgets();
- }
-}
-
-void InventoryWindow::updateWidgets()
+void InventoryWindow::windowResized(const WindowEvent &event)
{
gcn::Rectangle area = getChildrenArea();
int width = area.width;
@@ -235,15 +226,3 @@ Item* InventoryWindow::getItem()
{
return mItems->getItem();
}
-
-void InventoryWindow::loadWindowState()
-{
- Window::loadWindowState();
- updateWidgets();
-}
-
-void InventoryWindow::resetToDefaultSize()
-{
- Window::resetToDefaultSize();
- updateWidgets();
-}