From dfadf40d4273a0ef593188ccef47de486e5e87c6 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 16 Apr 2011 16:19:44 +0300 Subject: HUGO: Close prompt box dialog on Return key --- engines/hugo/dialogs.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines/hugo/dialogs.cpp') diff --git a/engines/hugo/dialogs.cpp b/engines/hugo/dialogs.cpp index 2d495d6d84..096cea8a72 100644 --- a/engines/hugo/dialogs.cpp +++ b/engines/hugo/dialogs.cpp @@ -269,7 +269,7 @@ EntryDialog::EntryDialog(const Common::String &title, const Common::String &butt lines[i], Graphics::kTextAlignCenter); } - _text = new GUI::EditTextWidget(this, 10, 10 + lineCount * (kLineHeight + 1), _w - 20, kLineHeight, ""); + _text = new GUI::EditTextWidget(this, 10, 10 + lineCount * (kLineHeight + 1), _w - 20, kLineHeight, "", "", 0, kCmdFinishEdit); _text->setEditString(defaultValue); _h += kLineHeight + 5; @@ -286,6 +286,7 @@ EntryDialog::~EntryDialog() { void EntryDialog::handleCommand(GUI::CommandSender *sender, uint32 command, uint32 data) { switch (command) { case kCmdButton: + case kCmdFinishEdit: close(); break; default: -- cgit v1.2.3