From c0e6ef1dd4941d689ea723542c4218179d688c7f Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Sun, 6 Dec 2009 09:35:29 -0700 Subject: Improve keyboard control of the QuitDialog Fixes http://mantis.themanaworld.org/view.php?id=562 . --- src/gui/quitdialog.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/gui/quitdialog.h') 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 +#include + +#include /** * 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 mOptions; + gcn::RadioButton *mLogoutQuit; gcn::RadioButton *mForceQuit; gcn::RadioButton *mSwitchAccountServer; -- cgit v1.2.3-70-g09d2