From 4bc80cd8810b4d328103e8bac75055a841b22d82 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 8 Jul 2012 01:00:48 +0200 Subject: GOB: Allow spaces in the Once Upon A Time character generator --- engines/gob/pregob/onceupon/onceupon.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'engines/gob') diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index f9e093374b..abee238d34 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -1599,6 +1599,9 @@ bool OnceUpon::enterString(Common::String &name, int16 key, uint maxLength, cons return true; } + if (key == kKeySpace) + key = ' '; + if ((key >= ' ') && (key <= 0xFF)) { if (name.size() >= maxLength) return false; @@ -1727,6 +1730,7 @@ OnceUpon::CharGenAction OnceUpon::characterGenerator() { } if ((key == kKeyReturn) && !_name.empty()) { + _name.trim(); _name.setChar(Util::toCP850Upper(_name[0]), 0); state = kCharGenStateSure; -- cgit v1.2.3