diff options
author | Ira Rice <irarice@gmail.com> | 2009-02-04 22:13:12 -0700 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-02-04 22:13:12 -0700 |
commit | b0a8b8607962081e87716ab0dfbca2439953f420 (patch) | |
tree | 0cd03f7c948c5d5647351f78ed9b3a33628c8b72 /src/gui/npcstringdialog.cpp | |
parent | 373f1aca8bb651332fec7031853d9a685ebc896e (diff) | |
download | mana-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.cpp')
-rw-r--r-- | src/gui/npcstringdialog.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/npcstringdialog.cpp b/src/gui/npcstringdialog.cpp index 468326d6..718c416f 100644 --- a/src/gui/npcstringdialog.cpp +++ b/src/gui/npcstringdialog.cpp @@ -33,6 +33,7 @@ NpcStringDialog::NpcStringDialog(): Window(_("NPC Text Request")) { mValueField = new TextField(""); + okButton = new Button(_("OK"), "ok", this); cancelButton = new Button(_("Cancel"), "cancel", this); @@ -71,3 +72,8 @@ bool NpcStringDialog::isInputFocused() { return mValueField->isFocused(); } + +void NpcStringDialog::requestFocus() +{ + mValueField->requestFocus(); +} |