From e7bf00480cfcdaa3ff23e6b14188b4c7cf683bc1 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 24 Mar 2018 15:11:14 -0400 Subject: XEEN: Reset interface keypress when getting an input string This is done by the original to prevent the Space key used to trigger events like the Mine Car or Pyramid teleporters from then triggering a 'wait a turn' after reaching the destination --- engines/xeen/dialogs/dialogs.h | 5 +++++ engines/xeen/dialogs/dialogs_input.cpp | 1 + 2 files changed, 6 insertions(+) (limited to 'engines/xeen/dialogs') diff --git a/engines/xeen/dialogs/dialogs.h b/engines/xeen/dialogs/dialogs.h index 9038f75ef8..08c17e8881 100644 --- a/engines/xeen/dialogs/dialogs.h +++ b/engines/xeen/dialogs/dialogs.h @@ -102,6 +102,11 @@ public: * Draws the buttons onto the passed surface */ void drawButtons(XSurface *surface); + + /** + * Clears any currently set button value + */ + void clearEvents() { _buttonValue = 0; } }; class SettingsBaseDialog : public ButtonContainer { diff --git a/engines/xeen/dialogs/dialogs_input.cpp b/engines/xeen/dialogs/dialogs_input.cpp index 0ac8f3612b..c2dac524c0 100644 --- a/engines/xeen/dialogs/dialogs_input.cpp +++ b/engines/xeen/dialogs/dialogs_input.cpp @@ -69,6 +69,7 @@ int Input::getString(Common::String &line, uint maxLen, int maxWidth, bool isNum } } + _vm->_interface->clearEvents(); _vm->_noDirectionSense = false; return line.size(); } -- cgit v1.2.3