diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/avalanche/avalot.cpp | 2 | ||||
-rw-r--r-- | engines/avalanche/parser.cpp | 13 | ||||
-rw-r--r-- | engines/avalanche/parser.h | 2 |
3 files changed, 17 insertions, 0 deletions
diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp index 772a6c7573..f553c453a0 100644 --- a/engines/avalanche/avalot.cpp +++ b/engines/avalanche/avalot.cpp @@ -171,6 +171,8 @@ void Avalot::handleKeyDown(const Common::Event &event) { case Common::KEYCODE_KP5: _vm->_trip->handleMoveKey(event); // Fallthroughs are intended. break; + case Common::KEYCODE_BACKSPACE : + _vm->_parser->handleBackspace(); } if ((32 <= event.kbd.ascii) && (event.kbd.ascii <= 128) && (event.kbd.ascii != 47)) diff --git a/engines/avalanche/parser.cpp b/engines/avalanche/parser.cpp index 7429fd9820..096aca3e60 100644 --- a/engines/avalanche/parser.cpp +++ b/engines/avalanche/parser.cpp @@ -56,6 +56,19 @@ void Parser::handleInputText(const Common::Event &event) { } } +void Parser::handleBackspace() { + if (! _vm->_dropdown->ddm_o.menunow) { + if (_inputTextPos > _leftMargin) { + _inputTextPos--; + if ((_inputText[_inputTextPos] == '"') || (_inputText[_inputTextPos] == '`')) + _quote = !_quote; + _inputText.deleteChar(_inputTextPos); + plotText(); + } else + _vm->_gyro->blip(); + } +} + void Parser::plotText() { if (_vm->_gyro->mouse_near_text()) _vm->_gyro->super_off(); diff --git a/engines/avalanche/parser.h b/engines/avalanche/parser.h index e10ca15b82..3dd5d37827 100644 --- a/engines/avalanche/parser.h +++ b/engines/avalanche/parser.h @@ -46,6 +46,8 @@ public: void handleInputText(const Common::Event &event); + void handleBackspace(); + void plotText(); private: |