summaryrefslogtreecommitdiff
path: root/src/gui/menuwindow.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-03-11 19:59:55 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-03-11 19:59:55 +0000
commitfc63e88f869919a8b035a5c41db8d05626526bde (patch)
tree8f1928d082ebbffc549c712a3f406c2141f43e01 /src/gui/menuwindow.cpp
parent7b0f0ec315e66dcbdda58ada8b09a59bc5dcf6c9 (diff)
downloadmana-fc63e88f869919a8b035a5c41db8d05626526bde.tar.gz
mana-fc63e88f869919a8b035a5c41db8d05626526bde.tar.bz2
mana-fc63e88f869919a8b035a5c41db8d05626526bde.tar.xz
mana-fc63e88f869919a8b035a5c41db8d05626526bde.zip
Merged 0.0 changes from revision 3065 to 3177 to trunk.
Diffstat (limited to 'src/gui/menuwindow.cpp')
-rw-r--r--src/gui/menuwindow.cpp25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/gui/menuwindow.cpp b/src/gui/menuwindow.cpp
index a5b5c99e..943cc6f0 100644
--- a/src/gui/menuwindow.cpp
+++ b/src/gui/menuwindow.cpp
@@ -30,8 +30,11 @@
#include "button.h"
#include "windowcontainer.h"
-extern Window *setupWindow, *inventoryWindow, *equipmentWindow,
- *skillDialog, *statusWindow;
+extern Window *setupWindow;
+extern Window *inventoryWindow;
+extern Window *equipmentWindow;
+extern Window *skillDialog;
+extern Window *statusWindow;
namespace {
struct MenuWindowListener : public gcn::ActionListener
@@ -52,9 +55,14 @@ MenuWindow::MenuWindow():
setTitleBarHeight(0);
// Buttons
- // ------------
- const char *buttonNames[] = {
- "Status", "Equipment", "Inventory", "Skills", "Setup", 0
+ const char *buttonNames[] =
+ {
+ "Status",
+ "Equipment",
+ "Inventory",
+ "Skills",
+ "Setup",
+ 0
};
int x = 0, y = 3, h = 0;
@@ -67,7 +75,11 @@ MenuWindow::MenuWindow():
h = btn->getHeight();
}
- setDefaultSize((windowContainer->getWidth() - x - 2), 0, x, (y + h));
+ setContentSize(x - 3, h);
+ setDefaultSize(windowContainer->getWidth() - getWidth() - 1,
+ 0,
+ x - 3,
+ y + h);
}
void MenuWindow::draw(gcn::Graphics *graphics)
@@ -79,6 +91,7 @@ void MenuWindow::draw(gcn::Graphics *graphics)
void MenuWindowListener::action(const gcn::ActionEvent &event)
{
Window *window = NULL;
+
if (event.getId() == "Status")
{
window = statusWindow;