summaryrefslogtreecommitdiff
path: root/src/gui/npcstringdialog.h
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-02-04 22:13:12 -0700
committerIra Rice <irarice@gmail.com>2009-02-04 22:13:12 -0700
commitb0a8b8607962081e87716ab0dfbca2439953f420 (patch)
tree0cd03f7c948c5d5647351f78ed9b3a33628c8b72 /src/gui/npcstringdialog.h
parent373f1aca8bb651332fec7031853d9a685ebc896e (diff)
downloadmana-b0a8b8607962081e87716ab0dfbca2439953f420.tar.gz
mana-b0a8b8607962081e87716ab0dfbca2439953f420.tar.bz2
mana-b0a8b8607962081e87716ab0dfbca2439953f420.tar.xz
mana-b0a8b8607962081e87716ab0dfbca2439953f420.zip
Modified the NPC string and integer classes to automatically take focus
to the input fields. Now the only NPC dialog which isn't completely navigatable by the keyboard alone is the NPC list dialog (seems to have regressed slightly recently). Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/npcstringdialog.h')
-rw-r--r--src/gui/npcstringdialog.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/npcstringdialog.h b/src/gui/npcstringdialog.h
index aa39764d..1933e0f1 100644
--- a/src/gui/npcstringdialog.h
+++ b/src/gui/npcstringdialog.h
@@ -23,7 +23,6 @@
#define GUI_NPCSTRINGDIALOG_H
#include <guichan/actionlistener.hpp>
-#include <guichan/keylistener.hpp>
#include "window.h"
@@ -64,6 +63,11 @@ class NpcStringDialog : public Window, public gcn::ActionListener
*/
bool isInputFocused();
+ /**
+ * Requests the textfield to take focus for input.
+ */
+ void requestFocus();
+
private:
gcn::TextField *mValueField;
gcn::Button *okButton;