diff options
Diffstat (limited to 'gui/widgets')
-rw-r--r-- | gui/widgets/list.cpp | 7 | ||||
-rw-r--r-- | gui/widgets/popup.cpp | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gui/widgets/list.cpp b/gui/widgets/list.cpp index 48d181e5ec..e5690fb6f2 100644 --- a/gui/widgets/list.cpp +++ b/gui/widgets/list.cpp @@ -359,6 +359,7 @@ bool ListWidget::handleKeyDown(Common::KeyState state) { handled = false; break; } + // fall through case Common::KEYCODE_BACKSPACE: case Common::KEYCODE_DELETE: if (_selectedItem >= 0) { @@ -375,6 +376,7 @@ bool ListWidget::handleKeyDown(Common::KeyState state) { handled = false; break; } + // fall through case Common::KEYCODE_END: _selectedItem = _list.size() - 1; break; @@ -385,6 +387,7 @@ bool ListWidget::handleKeyDown(Common::KeyState state) { handled = false; break; } + // fall through case Common::KEYCODE_DOWN: if (_selectedItem < (int)_list.size() - 1) _selectedItem++; @@ -395,6 +398,7 @@ bool ListWidget::handleKeyDown(Common::KeyState state) { handled = false; break; } + // fall through case Common::KEYCODE_PAGEDOWN: _selectedItem += _entriesPerPage - 1; if (_selectedItem >= (int)_list.size() ) @@ -406,6 +410,7 @@ bool ListWidget::handleKeyDown(Common::KeyState state) { handled = false; break; } + // fall through case Common::KEYCODE_HOME: _selectedItem = 0; break; @@ -415,6 +420,7 @@ bool ListWidget::handleKeyDown(Common::KeyState state) { handled = false; break; } + // fall through case Common::KEYCODE_UP: if (_selectedItem > 0) _selectedItem--; @@ -425,6 +431,7 @@ bool ListWidget::handleKeyDown(Common::KeyState state) { handled = false; break; } + // fall through case Common::KEYCODE_PAGEUP: _selectedItem -= _entriesPerPage - 1; if (_selectedItem < 0) diff --git a/gui/widgets/popup.cpp b/gui/widgets/popup.cpp index 82f4112a97..74fbc44823 100644 --- a/gui/widgets/popup.cpp +++ b/gui/widgets/popup.cpp @@ -234,6 +234,7 @@ void PopUpDialog::handleKeyDown(Common::KeyState state) { case Common::KEYCODE_KP1: if (state.flags & Common::KBD_NUM) break; + // fall through case Common::KEYCODE_END: setSelection(_popUpBoss->_entries.size()-1); break; @@ -241,6 +242,7 @@ void PopUpDialog::handleKeyDown(Common::KeyState state) { case Common::KEYCODE_KP2: if (state.flags & Common::KBD_NUM) break; + // fall through case Common::KEYCODE_DOWN: moveDown(); break; @@ -248,6 +250,7 @@ void PopUpDialog::handleKeyDown(Common::KeyState state) { case Common::KEYCODE_KP7: if (state.flags & Common::KBD_NUM) break; + // fall through case Common::KEYCODE_HOME: setSelection(0); break; @@ -255,6 +258,7 @@ void PopUpDialog::handleKeyDown(Common::KeyState state) { case Common::KEYCODE_KP8: if (state.flags & Common::KBD_NUM) break; + // fall through case Common::KEYCODE_UP: moveUp(); break; |