GUI: Mark some fall-through cases as intentional
Comments explain how the num lock handling works before the fall-through cases.
This commit is contained in:
parent
8e5ac98a4b
commit
f5b335af10
4 changed files with 21 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue