From f2a70bcfbaab713145d4af9cabfc344b665d1c61 Mon Sep 17 00:00:00 2001 From: Aaron Marks Date: Fri, 6 May 2005 02:25:31 +0000 Subject: Updated inventory window resizing with item name & description. --- src/gui/inventory.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/gui') diff --git a/src/gui/inventory.cpp b/src/gui/inventory.cpp index fff91065..5082e7cb 100644 --- a/src/gui/inventory.cpp +++ b/src/gui/inventory.cpp @@ -54,8 +54,6 @@ InventoryWindow::InventoryWindow(): itemNameLabel = new gcn::Label("Name:"); itemDescriptionLabel = new gcn::Label("Description:"); - itemNameLabel->setPosition(8,80); - itemDescriptionLabel->setPosition(8,92); add(useButton); add(dropButton); @@ -209,7 +207,11 @@ void InventoryWindow::updateWidgets() useButton->setPosition(8, getHeight() - 24); dropButton->setPosition(48 + 16, getHeight() - 24); items->setSize(getWidth() - 24 - 12 - 1, (INVENTORY_SIZE * 24) / (getWidth() / 24) - 1); - invenScroll->setSize(getWidth() - 16, 70); + invenScroll->setSize(getWidth() - 16, getHeight() - 72); + + itemNameLabel->setPosition(8, invenScroll->getY() + invenScroll->getHeight() + 4); + itemDescriptionLabel->setPosition(8, itemNameLabel->getY() + itemNameLabel->getHeight() + 4); + setContentSize(getWidth(), getHeight()); } -- cgit v1.2.3-70-g09d2