diff options
-rw-r--r-- | gui/ThemeEngine.cpp | 1 | ||||
-rw-r--r-- | gui/console.cpp | 9 | ||||
-rw-r--r-- | gui/widgets/list.cpp | 7 | ||||
-rw-r--r-- | gui/widgets/popup.cpp | 4 |
4 files changed, 21 insertions, 0 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index d340047b1c..5c0b23279f 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -630,6 +630,7 @@ void ThemeEngine::setGraphicsMode(GraphicsMode mode) { _bytesPerPixel = sizeof(uint16); break; } + // fall through default: error("Invalid graphics mode"); } diff --git a/gui/console.cpp b/gui/console.cpp index 4cdad41f5f..27b38ac78b 100644 --- a/gui/console.cpp +++ b/gui/console.cpp @@ -353,6 +353,7 @@ void ConsoleDialog::handleKeyDown(Common::KeyState state) { defaultKeyDownHandler(state); break; } + // fall through case Common::KEYCODE_DELETE: if (_currentPos < _promptEndPos) { killChar(); @@ -365,6 +366,7 @@ void ConsoleDialog::handleKeyDown(Common::KeyState state) { defaultKeyDownHandler(state); break; } + // fall through case Common::KEYCODE_END: if (state.hasFlags(Common::KBD_SHIFT)) { _scrollLine = _promptEndPos / kCharsPerLine; @@ -382,6 +384,7 @@ void ConsoleDialog::handleKeyDown(Common::KeyState state) { defaultKeyDownHandler(state); break; } + // fall through case Common::KEYCODE_DOWN: historyScroll(-1); break; @@ -391,6 +394,7 @@ void ConsoleDialog::handleKeyDown(Common::KeyState state) { defaultKeyDownHandler(state); break; } + // fall through case Common::KEYCODE_PAGEDOWN: if (state.hasFlags(Common::KBD_SHIFT)) { _scrollLine += _linesPerPage - 1; @@ -409,6 +413,7 @@ void ConsoleDialog::handleKeyDown(Common::KeyState state) { defaultKeyDownHandler(state); break; } + // fall through case Common::KEYCODE_LEFT: if (_currentPos > _promptStartPos) _currentPos--; @@ -420,6 +425,7 @@ void ConsoleDialog::handleKeyDown(Common::KeyState state) { defaultKeyDownHandler(state); break; } + // fall through case Common::KEYCODE_RIGHT: if (_currentPos < _promptEndPos) _currentPos++; @@ -431,6 +437,7 @@ void ConsoleDialog::handleKeyDown(Common::KeyState state) { defaultKeyDownHandler(state); break; } + // fall through case Common::KEYCODE_HOME: if (state.hasFlags(Common::KBD_SHIFT)) { _scrollLine = _firstLineInBuffer + _linesPerPage - 1; @@ -446,6 +453,7 @@ void ConsoleDialog::handleKeyDown(Common::KeyState state) { defaultKeyDownHandler(state); break; } + // fall through case Common::KEYCODE_UP: historyScroll(+1); break; @@ -455,6 +463,7 @@ void ConsoleDialog::handleKeyDown(Common::KeyState state) { defaultKeyDownHandler(state); break; } + // fall through case Common::KEYCODE_PAGEUP: if (state.hasFlags(Common::KBD_SHIFT)) { _scrollLine -= _linesPerPage - 1; 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; |