summaryrefslogtreecommitdiff
path: root/src/gui/setup.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-03-10 12:23:50 -0600
committerJared Adams <jaxad0127@gmail.com>2009-03-10 12:23:50 -0600
commit17f9d5abcb05da185486ccfba293f3a8c9eab437 (patch)
tree7545a7bdd3acefc1ff92f345416872c896b90ddb /src/gui/setup.cpp
parent4a08d3b4bec3fa0fc1878140b0f14c8b38d6420b (diff)
downloadmana-17f9d5abcb05da185486ccfba293f3a8c9eab437.tar.gz
mana-17f9d5abcb05da185486ccfba293f3a8c9eab437.tar.bz2
mana-17f9d5abcb05da185486ccfba293f3a8c9eab437.tar.xz
mana-17f9d5abcb05da185486ccfba293f3a8c9eab437.zip
Fix some mem leaks
Diffstat (limited to 'src/gui/setup.cpp')
-rw-r--r--src/gui/setup.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp
index 148e8b75..62d79d4d 100644
--- a/src/gui/setup.cpp
+++ b/src/gui/setup.cpp
@@ -64,9 +64,9 @@ Setup::Setup():
btn->setPosition(x, height - btn->getHeight() - 5);
add(btn);
- // Disable this button when the windows aren't created yet
+ // Store this button, as it needs to be enabled/disabled
if (!strcmp(*curBtn, "Reset Windows"))
- btn->setEnabled(statusWindow != NULL);
+ mResetWindows = btn;
}
TabbedArea *panel = new TabbedArea;
@@ -101,6 +101,8 @@ Setup::Setup():
add(panel);
setLocationRelativeTo(getParent());
+
+ setInGame(false);
}
Setup::~Setup()
@@ -140,3 +142,8 @@ void Setup::action(const gcn::ActionEvent &event)
tradeWindow->resetToDefaultSize();
}
}
+
+void Setup::setInGame(bool inGame)
+{
+ mResetWindows->setEnabled(inGame);
+} \ No newline at end of file