summaryrefslogtreecommitdiff
path: root/src/gui/inventorywindow.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-04-07 15:23:07 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-04-07 15:23:07 +0000
commit92950d2f309550e21b33d851ef9bbf7906ce5e50 (patch)
tree18a6d2539c6e004e52cbebb1e61d8f8f0344f9a0 /src/gui/inventorywindow.cpp
parent3f3ba5f3e18b0a5093e7275aee574ecd6f293ec6 (diff)
downloadmana-client-92950d2f309550e21b33d851ef9bbf7906ce5e50.tar.gz
mana-client-92950d2f309550e21b33d851ef9bbf7906ce5e50.tar.bz2
mana-client-92950d2f309550e21b33d851ef9bbf7906ce5e50.tar.xz
mana-client-92950d2f309550e21b33d851ef9bbf7906ce5e50.zip
Upgraded to Guichan 0.8.0 (merge from guichan-0.8 branch, except for
gcn::TabbedArea usage)
Diffstat (limited to 'src/gui/inventorywindow.cpp')
-rw-r--r--src/gui/inventorywindow.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index 83dadbc9..7062720d 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -81,7 +81,6 @@ InventoryWindow::InventoryWindow():
mUseButton->setSize(60, mUseButton->getHeight());
- addWindowListener(this);
loadWindowState();
}
@@ -132,7 +131,7 @@ void InventoryWindow::action(const gcn::ActionEvent &event)
}
}
-void InventoryWindow::selectionChanged(const SelectionEvent &event)
+void InventoryWindow::valueChanged(const gcn::SelectionEvent &event)
{
Item *item = mItems->getItem();
@@ -169,17 +168,19 @@ void InventoryWindow::mouseClicked(gcn::MouseEvent &event)
/* Convert relative to the window coordinates to absolute screen
* coordinates.
*/
- int mx = event.getX() + getX();
- int my = event.getY() + getY();
+ const int mx = event.getX() + getX();
+ const int my = event.getY() + getY();
viewport->showPopup(mx, my, item);
}
}
-void InventoryWindow::windowResized(const WindowEvent &event)
+void InventoryWindow::widgetResized(const gcn::Event &event)
{
- gcn::Rectangle area = getChildrenArea();
- int width = area.width;
- int height = area.height;
+ Window::widgetResized(event);
+
+ const gcn::Rectangle &area = getChildrenArea();
+ const int width = area.width;
+ const int height = area.height;
int columns = width / 24;
if (columns < 1)