From fc48c24c6d366e165cbcfbd022d9421790089890 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Sun, 6 Dec 2009 13:01:16 -0700 Subject: Improve keyboard accessibility of login sequence Enter and Escape now move forward and backwards for all dialogs except ServerSelectDialog (Escape quits) and CharSelectDialog (Enter doesn't do anything special). --- src/gui/charselectdialog.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/gui/charselectdialog.h') diff --git a/src/gui/charselectdialog.h b/src/gui/charselectdialog.h index 44917d6c..507b0d9f 100644 --- a/src/gui/charselectdialog.h +++ b/src/gui/charselectdialog.h @@ -30,6 +30,7 @@ #include "player.h" #include +#include class CharEntry; class LocalPlayer; @@ -45,7 +46,8 @@ class CharHandler; * * \ingroup Interface */ -class CharSelectDialog : public Window, public gcn::ActionListener +class CharSelectDialog : public Window, public gcn::ActionListener, + public gcn::KeyListener { public: friend class CharDeleteConfirm; @@ -58,6 +60,8 @@ class CharSelectDialog : public Window, public gcn::ActionListener void action(const gcn::ActionEvent &event); + void keyPressed(gcn::KeyEvent &keyEvent); + bool selectByName(const std::string &name); void chooseSelected(); -- cgit v1.2.3-60-g2f50