diff options
author | Aaron Marks <nymacro@gmail.com> | 2005-05-06 02:25:31 +0000 |
---|---|---|
committer | Aaron Marks <nymacro@gmail.com> | 2005-05-06 02:25:31 +0000 |
commit | f2a70bcfbaab713145d4af9cabfc344b665d1c61 (patch) | |
tree | 6ba7a32743d196517961dbed9dfcb5bfaf99160d /src | |
parent | 806c2987088eed17f4987e13159da80f7fd940b2 (diff) | |
download | mana-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')
-rw-r--r-- | src/gui/inventory.cpp | 8 |
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()); } |