summaryrefslogtreecommitdiff
path: root/src/gui/quitdialog.h
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-12-06 09:35:29 -0700
committerJared Adams <jaxad0127@gmail.com>2009-12-06 09:35:29 -0700
commitc0e6ef1dd4941d689ea723542c4218179d688c7f (patch)
treedd576b75017badcf9c6740efbc1821ed811d48ef /src/gui/quitdialog.h
parent7ff6ea8d742b41603a8f08c2fc16c683330cb5ec (diff)
downloadmana-client-c0e6ef1dd4941d689ea723542c4218179d688c7f.tar.gz
mana-client-c0e6ef1dd4941d689ea723542c4218179d688c7f.tar.bz2
mana-client-c0e6ef1dd4941d689ea723542c4218179d688c7f.tar.xz
mana-client-c0e6ef1dd4941d689ea723542c4218179d688c7f.zip
Improve keyboard control of the QuitDialog
Fixes http://mantis.themanaworld.org/view.php?id=562 .
Diffstat (limited to 'src/gui/quitdialog.h')
-rw-r--r--src/gui/quitdialog.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/gui/quitdialog.h b/src/gui/quitdialog.h
index 04ce6d16..83c514e6 100644
--- a/src/gui/quitdialog.h
+++ b/src/gui/quitdialog.h
@@ -25,22 +25,24 @@
#include "gui/widgets/window.h"
#include "guichanfwd.h"
-#include "main.h"
#include <guichan/actionlistener.hpp>
+#include <guichan/keylistener.hpp>
+
+#include <vector>
/**
* The quit dialog.
*
* \ingroup Interface
*/
-class QuitDialog : public Window, public gcn::ActionListener
+class QuitDialog : public Window, public gcn::ActionListener,
+ public gcn::KeyListener
{
public:
/**
* Constructor
*
- * @quitGame; to be used for getting out of the while loop in Game
* @pointerToMe will be set to NULL when the QuitDialog is destroyed
*/
QuitDialog(QuitDialog **pointerToMe);
@@ -55,7 +57,12 @@ class QuitDialog : public Window, public gcn::ActionListener
*/
void action(const gcn::ActionEvent &event);
+ void keyPressed(gcn::KeyEvent &keyEvent);
+
private:
+ void placeOption(ContainerPlacer &place, gcn::RadioButton *option);
+ std::vector<gcn::RadioButton*> mOptions;
+
gcn::RadioButton *mLogoutQuit;
gcn::RadioButton *mForceQuit;
gcn::RadioButton *mSwitchAccountServer;