diff options
author | Martin Kiewitz | 2010-02-01 15:44:24 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-02-01 15:44:24 +0000 |
commit | bc89883da8d521ec1012e7328d83b0d714530f33 (patch) | |
tree | 37e8206788bd71dcc7eab71eda315bc6311e134d /gui | |
parent | 097b45db21cfffeb5e9acd5f6bbdfd90fd5b5cfd (diff) | |
download | scummvm-rg350-bc89883da8d521ec1012e7328d83b0d714530f33.tar.gz scummvm-rg350-bc89883da8d521ec1012e7328d83b0d714530f33.tar.bz2 scummvm-rg350-bc89883da8d521ec1012e7328d83b0d714530f33.zip |
partly reverting r46807 ffs. Regression in numpad handling - ID: 2943361
svn-id: r47796
Diffstat (limited to 'gui')
-rw-r--r-- | gui/ListWidget.cpp | 8 | ||||
-rw-r--r-- | gui/PopUpWidget.cpp | 4 | ||||
-rw-r--r-- | gui/console.cpp | 4 | ||||
-rw-r--r-- | gui/editable.cpp | 4 |
4 files changed, 1 insertions, 19 deletions
diff --git a/gui/ListWidget.cpp b/gui/ListWidget.cpp index 44431f9932..fb6d7de2c5 100644 --- a/gui/ListWidget.cpp +++ b/gui/ListWidget.cpp @@ -286,7 +286,7 @@ bool ListWidget::handleKeyDown(Common::KeyState state) { bool dirty = false; int oldSelectedItem = _selectedItem; - if (!_editMode && state.keycode <= Common::KEYCODE_z && isprint((unsigned char)state.ascii)) { + if (!_editMode && isprint((unsigned char)state.ascii)) { // Quick selection mode: Go to first list item starting with this key // (or a substring accumulated from the last couple key presses). // Only works in a useful fashion if the list entries are sorted. @@ -351,33 +351,27 @@ bool ListWidget::handleKeyDown(Common::KeyState state) { } break; case Common::KEYCODE_UP: - case Common::KEYCODE_KP8: if (_selectedItem > 0) _selectedItem--; break; case Common::KEYCODE_DOWN: - case Common::KEYCODE_KP2: if (_selectedItem < (int)_list.size() - 1) _selectedItem++; break; case Common::KEYCODE_PAGEUP: - case Common::KEYCODE_KP9: _selectedItem -= _entriesPerPage - 1; if (_selectedItem < 0) _selectedItem = 0; break; case Common::KEYCODE_PAGEDOWN: - case Common::KEYCODE_KP3: _selectedItem += _entriesPerPage - 1; if (_selectedItem >= (int)_list.size() ) _selectedItem = _list.size() - 1; break; case Common::KEYCODE_HOME: - case Common::KEYCODE_KP7: _selectedItem = 0; break; case Common::KEYCODE_END: - case Common::KEYCODE_1: _selectedItem = _list.size() - 1; break; default: diff --git a/gui/PopUpWidget.cpp b/gui/PopUpWidget.cpp index 15b7557aef..35cfaf6d4a 100644 --- a/gui/PopUpWidget.cpp +++ b/gui/PopUpWidget.cpp @@ -228,19 +228,15 @@ void PopUpDialog::handleKeyDown(Common::KeyState state) { close(); break; case Common::KEYCODE_UP: - case Common::KEYCODE_KP8: moveUp(); break; case Common::KEYCODE_DOWN: - case Common::KEYCODE_KP2: moveDown(); break; case Common::KEYCODE_HOME: - case Common::KEYCODE_KP7: setSelection(0); break; case Common::KEYCODE_END: - case Common::KEYCODE_KP1: setSelection(_popUpBoss->_entries.size()-1); break; default: diff --git a/gui/console.cpp b/gui/console.cpp index f412ca4fa0..9ac9cf09e1 100644 --- a/gui/console.cpp +++ b/gui/console.cpp @@ -386,21 +386,17 @@ void ConsoleDialog::handleKeyDown(Common::KeyState state) { draw(); break; case Common::KEYCODE_UP: - case Common::KEYCODE_KP8: historyScroll(+1); break; case Common::KEYCODE_DOWN: - case Common::KEYCODE_KP2: historyScroll(-1); break; case Common::KEYCODE_RIGHT: - case Common::KEYCODE_KP6: if (_currentPos < _promptEndPos) _currentPos++; drawLine(pos2line(_currentPos)); break; case Common::KEYCODE_LEFT: - case Common::KEYCODE_KP4: if (_currentPos > _promptStartPos) _currentPos--; drawLine(pos2line(_currentPos)); diff --git a/gui/editable.cpp b/gui/editable.cpp index 0eca1aec55..232873ffe3 100644 --- a/gui/editable.cpp +++ b/gui/editable.cpp @@ -124,7 +124,6 @@ bool EditableWidget::handleKeyDown(Common::KeyState state) { forcecaret = true; break; case Common::KEYCODE_LEFT: - case Common::KEYCODE_KP4: if (_caretPos > 0) { dirty = setCaretPos(_caretPos - 1); } @@ -132,7 +131,6 @@ bool EditableWidget::handleKeyDown(Common::KeyState state) { dirty = true; break; case Common::KEYCODE_RIGHT: - case Common::KEYCODE_KP6: if (_caretPos < (int)_editString.size()) { dirty = setCaretPos(_caretPos + 1); } @@ -140,12 +138,10 @@ bool EditableWidget::handleKeyDown(Common::KeyState state) { dirty = true; break; case Common::KEYCODE_HOME: - case Common::KEYCODE_KP7: dirty = setCaretPos(0); forcecaret = true; break; case Common::KEYCODE_END: - case Common::KEYCODE_KP1: dirty = setCaretPos(_editString.size()); forcecaret = true; break; |