From fd193321df49fe33697a77f6721b4e1fc13fe05b Mon Sep 17 00:00:00 2001 From: Aaron Marks Date: Wed, 27 Apr 2005 11:25:42 +0000 Subject: Updated item container (fixed rendering position errors). Moved widgets in inventory so everything is aligned. --- src/gui/inventory.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/gui/inventory.cpp') diff --git a/src/gui/inventory.cpp b/src/gui/inventory.cpp index d6851347..73a98575 100644 --- a/src/gui/inventory.cpp +++ b/src/gui/inventory.cpp @@ -37,15 +37,15 @@ InventoryWindow::InventoryWindow(): { setContentSize(322, 100); useButton = new Button("Use"); - useButton->setPosition(20, getHeight() - 48); + useButton->setPosition(8, getHeight() - 48); dropButton = new Button("Drop"); - dropButton->setPosition(60, getHeight() - 48); + dropButton->setPosition(40, getHeight() - 48); items = new ItemContainer(); items->setPosition(2, 2); invenScroll = new ScrollArea(items); - invenScroll->setPosition(4, 4); + invenScroll->setPosition(8, 8); useButton->setEventId("use"); dropButton->setEventId("drop"); @@ -168,11 +168,11 @@ void InventoryWindow::mouseMotion(int mx, int my) void InventoryWindow::updateWidgets() { - //resize widgets - useButton->setPosition(20, getHeight() - 24); - dropButton->setPosition(60, getHeight() - 24); - items->setSize(getWidth() - 24 - 12 - 8 - 1, (INVENTORY_SIZE * 24) / (getWidth() / 24) - 1); - invenScroll->setSize(getWidth() - 32, getHeight() - 32 - 8); - setContentSize(getWidth(), getHeight()); + //resize widgets + useButton->setPosition(8, getHeight() - 24); + dropButton->setPosition(40, getHeight() - 24); + items->setSize(getWidth() - 24 - 12 - 1, (INVENTORY_SIZE * 24) / (getWidth() / 24) - 1); + invenScroll->setSize(getWidth() - 16, getHeight() - 32 - 8); + setContentSize(getWidth(), getHeight()); } -- cgit v1.2.3-70-g09d2