summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAaron Marks <nymacro@gmail.com>2005-05-06 02:25:31 +0000
committerAaron Marks <nymacro@gmail.com>2005-05-06 02:25:31 +0000
commitf2a70bcfbaab713145d4af9cabfc344b665d1c61 (patch)
tree6ba7a32743d196517961dbed9dfcb5bfaf99160d /src/gui
parent806c2987088eed17f4987e13159da80f7fd940b2 (diff)
downloadmana-f2a70bcfbaab713145d4af9cabfc344b665d1c61.tar.gz
mana-f2a70bcfbaab713145d4af9cabfc344b665d1c61.tar.bz2
mana-f2a70bcfbaab713145d4af9cabfc344b665d1c61.tar.xz
mana-f2a70bcfbaab713145d4af9cabfc344b665d1c61.zip
Updated inventory window resizing with item name & description.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/inventory.cpp8
1 files changed, 5 insertions, 3 deletions
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());
}