diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-12-06 09:35:29 -0700 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-12-06 09:35:29 -0700 |
commit | c0e6ef1dd4941d689ea723542c4218179d688c7f (patch) | |
tree | dd576b75017badcf9c6740efbc1821ed811d48ef /src/gui/quitdialog.h | |
parent | 7ff6ea8d742b41603a8f08c2fc16c683330cb5ec (diff) | |
download | mana-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.h | 13 |
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; |