summaryrefslogtreecommitdiff
path: root/src/gui/inventorywindow.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-09-19 17:28:33 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-09-19 17:28:33 +0000
commit1a9320fafb23940d0463e6f384713d0f99fc0c61 (patch)
treed152680dbdc8febf0b5a445ba760255068d72f04 /src/gui/inventorywindow.cpp
parent2f027ebcf8f0ad78f7edf58af7dda94d89034c85 (diff)
downloadmana-client-1a9320fafb23940d0463e6f384713d0f99fc0c61.tar.gz
mana-client-1a9320fafb23940d0463e6f384713d0f99fc0c61.tar.bz2
mana-client-1a9320fafb23940d0463e6f384713d0f99fc0c61.tar.xz
mana-client-1a9320fafb23940d0463e6f384713d0f99fc0c61.zip
Merged 0.0 changes from revision 3362 to 3580 to trunk.
Diffstat (limited to 'src/gui/inventorywindow.cpp')
-rw-r--r--src/gui/inventorywindow.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index 085ab188..1e62b130 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -51,6 +51,7 @@ InventoryWindow::InventoryWindow():
mSplit(false)
{
setResizable(true);
+ setCloseButton(true);
setMinWidth(240);
setMinHeight(172);
// If you adjust these defaults, don't forget to adjust the trade window's.
@@ -69,7 +70,6 @@ InventoryWindow::InventoryWindow():
mItems->addSelectionListener(this);
mInvenScroll = new ScrollArea(mItems);
- mInvenScroll->setPosition(8, 8);
mItemNameLabel = new gcn::Label(strprintf(_("Name: %s"), ""));
mItemDescriptionLabel = new gcn::Label(
@@ -100,8 +100,8 @@ InventoryWindow::InventoryWindow():
mSplitButton->setWidth(48);
}
+ addWindowListener(this);
loadWindowState("Inventory");
- updateContentSize();
}
InventoryWindow::~InventoryWindow()
@@ -130,7 +130,6 @@ void InventoryWindow::logic()
mWeightLabel->setCaption(
strprintf(_("Total Weight: %d - Maximum Weight: %d"),
player_node->getTotalWeight(), player_node->getMaxWeight()));
- mWeightLabel->adjustSize();
}
void InventoryWindow::action(const gcn::ActionEvent &event)
@@ -215,7 +214,7 @@ void InventoryWindow::mouseClicked(gcn::MouseEvent &event)
}
}
-void InventoryWindow::updateContentSize()
+void InventoryWindow::windowResized(const WindowEvent &event)
{
const gcn::Rectangle area = getChildrenArea();
@@ -260,8 +259,7 @@ Item* InventoryWindow::getItem()
return mItems->getItem();
}
-void
-InventoryWindow::keyPressed(gcn::KeyEvent &event)
+void InventoryWindow::keyPressed(gcn::KeyEvent &event)
{
switch (event.getKey().getValue())
{
@@ -271,8 +269,7 @@ InventoryWindow::keyPressed(gcn::KeyEvent &event)
}
}
-void
-InventoryWindow::keyReleased(gcn::KeyEvent &event)
+void InventoryWindow::keyReleased(gcn::KeyEvent &event)
{
switch (event.getKey().getValue())
{