aboutsummaryrefslogtreecommitdiff
path: root/gui/dialog.cpp
diff options
context:
space:
mode:
authorZerophase2014-03-31 00:43:54 -0500
committerZerophase2014-04-01 07:28:48 -0500
commit80d34a8a7cc6960006bc90f80686c2241f60226f (patch)
tree3f49cdfdb70fae63ab47f6ccbbbf24cee9683bd9 /gui/dialog.cpp
parentd91c8b9add255828bb363020077d91a49ebe3d99 (diff)
downloadscummvm-rg350-80d34a8a7cc6960006bc90f80686c2241f60226f.tar.gz
scummvm-rg350-80d34a8a7cc6960006bc90f80686c2241f60226f.tar.bz2
scummvm-rg350-80d34a8a7cc6960006bc90f80686c2241f60226f.zip
GUI: Add Tab cycling to TabWidget
Tab and Shift-Tab can now cycle between each Tab of the Edit Game menu.
Diffstat (limited to 'gui/dialog.cpp')
-rw-r--r--gui/dialog.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/gui/dialog.cpp b/gui/dialog.cpp
index ec392a877a..fa4e508494 100644
--- a/gui/dialog.cpp
+++ b/gui/dialog.cpp
@@ -250,7 +250,18 @@ void Dialog::handleKeyDown(Common::KeyState state) {
close();
}
- // TODO: tab/shift-tab should focus the next/previous focusable widget
+ if (state.keycode == Common::KEYCODE_TAB) {
+ // TODO: Maybe add Tab behaviours for all widgets too.
+ // searches through widgets on screen for tab widget
+ Widget *w = _firstWidget;
+ while (w) {
+ if (w->_type == kTabWidget)
+ if (w->handleKeyDown(state))
+ return;
+
+ w = w->_next;
+ }
+ }
}
void Dialog::handleKeyUp(Common::KeyState state) {