aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 {