diff options
author | strangerke | 2011-03-17 20:07:24 +0100 |
---|---|---|
committer | strangerke | 2011-03-17 20:07:24 +0100 |
commit | 563ac93c166f31864c2bcaa9e99e71e2c5882910 (patch) | |
tree | 396725731c35fef0cdfa8f4f2ad3db34b3a6a663 /engines/hugo/util.cpp | |
parent | 758aa78acc129c78942246df0e6425f03f2fa968 (diff) | |
download | scummvm-rg350-563ac93c166f31864c2bcaa9e99e71e2c5882910.tar.gz scummvm-rg350-563ac93c166f31864c2bcaa9e99e71e2c5882910.tar.bz2 scummvm-rg350-563ac93c166f31864c2bcaa9e99e71e2c5882910.zip |
Hugo: Use EntryDialog in Box()
Diffstat (limited to 'engines/hugo/util.cpp')
-rw-r--r-- | engines/hugo/util.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/hugo/util.cpp b/engines/hugo/util.cpp index f342d4e354..f36c431867 100644 --- a/engines/hugo/util.cpp +++ b/engines/hugo/util.cpp @@ -89,7 +89,7 @@ void Utils::reverseByte(byte *data) { *data = result; } -char *Utils::Box(box_t dismiss, const char *s, ...) { +const char *Utils::Box(box_t dismiss, const char *s, ...) { static char buffer[kMaxStrLength + 1]; // Format text into this if (!s) @@ -126,18 +126,18 @@ char *Utils::Box(box_t dismiss, const char *s, ...) { break; } case kBoxPrompt: { - // TODO: Some boxes (i.e. the combination code for the shed), needs to return an input. - warning("Box: unhandled BOX_PROMPT"); - int boxTime = strlen(buffer) * 30; - GUI::TimedMessageDialog dialog(buffer, MAX(1500, boxTime)); - dialog.runModal(); + EntryDialog dialog(buffer, "OK", ""); + Common::String result = dialog.getEditString(); + + return result.c_str(); + break; } default: error("Unknown BOX Type %d", dismiss); } - return buffer; + return 0; } char *Utils::strlwr(char *buffer) { |