aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2018-03-24 15:11:14 -0400
committerPaul Gilbert2018-03-24 15:13:11 -0400
commite7bf00480cfcdaa3ff23e6b14188b4c7cf683bc1 (patch)
treec3627e221c8e82819efbef863272cbc8922a9683 /engines
parente06ff763ab951a4cc76eefce88cb5128d325710f (diff)
downloadscummvm-rg350-e7bf00480cfcdaa3ff23e6b14188b4c7cf683bc1.tar.gz
scummvm-rg350-e7bf00480cfcdaa3ff23e6b14188b4c7cf683bc1.tar.bz2
scummvm-rg350-e7bf00480cfcdaa3ff23e6b14188b4c7cf683bc1.zip
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
Diffstat (limited to 'engines')
-rw-r--r--engines/xeen/dialogs/dialogs.h5
-rw-r--r--engines/xeen/dialogs/dialogs_input.cpp1
2 files changed, 6 insertions, 0 deletions
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();
}