summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-03-10 12:43:56 -0600
committerIra Rice <irarice@gmail.com>2009-03-10 12:59:03 -0600
commit4676d0fe6ee938031ce13a65927718f9b53810cf (patch)
treee0cbcf26a8814d69826627528b7eb813ae789ed2 /src/gui
parentcabb9735f2e31b9f1f64b2496e1775d54861da36 (diff)
downloadmana-client-4676d0fe6ee938031ce13a65927718f9b53810cf.tar.gz
mana-client-4676d0fe6ee938031ce13a65927718f9b53810cf.tar.bz2
mana-client-4676d0fe6ee938031ce13a65927718f9b53810cf.tar.xz
mana-client-4676d0fe6ee938031ce13a65927718f9b53810cf.zip
Remove some SetupWindow weirdness
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/setup.cpp13
-rw-r--r--src/gui/setup.h8
2 files changed, 18 insertions, 3 deletions
diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp
index 4798f598..f1e7a6d9 100644
--- a/src/gui/setup.cpp
+++ b/src/gui/setup.cpp
@@ -65,12 +65,12 @@ 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();
+ TabbedArea *panel = new TabbedArea;
panel->setDimension(gcn::Rectangle(5, 5, width - 10, height - 40));
SetupTab *tab;
@@ -141,3 +141,10 @@ void Setup::action(const gcn::ActionEvent &event)
tradeWindow->resetToDefaultSize();
}
}
+
+void Setup::setInGame(bool inGame)
+{
+ mResetWindows->setEnabled(inGame);
+}
+
+Setup* setupWindow;
diff --git a/src/gui/setup.h b/src/gui/setup.h
index 9f1bafc7..663bdfcb 100644
--- a/src/gui/setup.h
+++ b/src/gui/setup.h
@@ -56,8 +56,16 @@ class Setup : public Window, public gcn::ActionListener
*/
void action(const gcn::ActionEvent &event);
+ /**
+ * Enables the reset button when in game.
+ */
+ void setInGame(bool inGame);
+
private:
std::list<SetupTab*> mTabs;
+ gcn::Button* mResetWindows;
};
+extern Setup* setupWindow;
+
#endif