aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2011-04-16 16:19:44 +0300
committerEugene Sandulenko2011-04-16 16:19:44 +0300
commitdfadf40d4273a0ef593188ccef47de486e5e87c6 (patch)
tree8d9c67bc0fad09106b5fa7f3f2985940616e8d06
parent6224b74f34f0c055b6d9e2511bf9688d02c946c3 (diff)
downloadscummvm-rg350-dfadf40d4273a0ef593188ccef47de486e5e87c6.tar.gz
scummvm-rg350-dfadf40d4273a0ef593188ccef47de486e5e87c6.tar.bz2
scummvm-rg350-dfadf40d4273a0ef593188ccef47de486e5e87c6.zip
HUGO: Close prompt box dialog on Return key
-rw-r--r--engines/hugo/dialogs.cpp3
-rw-r--r--engines/hugo/dialogs.h3
2 files changed, 4 insertions, 2 deletions
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:
diff --git a/engines/hugo/dialogs.h b/engines/hugo/dialogs.h
index 917c9292f6..56dbd41f81 100644
--- a/engines/hugo/dialogs.h
+++ b/engines/hugo/dialogs.h
@@ -67,7 +67,8 @@ enum {
kCmdInvent = 'INVT',
// EntryDialog commands
- kCmdButton = 'BTNP'
+ kCmdButton = 'BTNP',
+ kCmdFinishEdit = 'FNSH'
};
class TopMenu : public GUI::Dialog {