From 5cf5f65fd67cbae98a54479f0cba8be0f2876bd3 Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Fri, 30 Sep 2005 19:19:47 +0000 Subject: Made the inventory Win behave normally when resized by default size functions. --- src/gui/inventorywindow.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/gui/inventorywindow.cpp') diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp index af6c437e..3c373165 100644 --- a/src/gui/inventorywindow.cpp +++ b/src/gui/inventorywindow.cpp @@ -80,7 +80,6 @@ InventoryWindow::InventoryWindow(): add(itemEffectLabel); add(weightLabel); - updateWidgets(); useButton->setSize(48, useButton->getHeight()); loadWindowState(); @@ -235,3 +234,20 @@ Item* InventoryWindow::getItem() { return items->getItem(); } + +void InventoryWindow::loadWindowState() +{ + Window::loadWindowState(); + updateWidgets(); +} + +void InventoryWindow::setDefaultSize(int defaultX, int defaultY, int defaultWidth, int defaultHeight) +{ + Window::setDefaultSize(defaultX, defaultY, defaultWidth, defaultHeight); +} + +void InventoryWindow::resetToDefaultSize() +{ + Window::resetToDefaultSize(); + updateWidgets(); +} -- cgit v1.2.3-70-g09d2