diff options
| author | Arnaud Boutonné | 2010-10-10 10:32:58 +0000 |
|---|---|---|
| committer | Arnaud Boutonné | 2010-10-10 10:32:58 +0000 |
| commit | af6ffafe5fd6549b5dfce516a6c255cba515f54a (patch) | |
| tree | b5ee0e1cad9d1608ae97803df993cb1ad479bd1f /gui | |
| parent | 8e6ce812d1d4b27e048b1a2468ecbb6650e6fe32 (diff) | |
| download | scummvm-rg350-af6ffafe5fd6549b5dfce516a6c255cba515f54a.tar.gz scummvm-rg350-af6ffafe5fd6549b5dfce516a6c255cba515f54a.tar.bz2 scummvm-rg350-af6ffafe5fd6549b5dfce516a6c255cba515f54a.zip | |
GUI: Message dialog width
Ensure the message dialog is wide enough when it contains 2 buttons. This is used by Hugo's engine, e.g. when Exiting the DOS versions.
svn-id: r53114
Diffstat (limited to 'gui')
| -rw-r--r-- | gui/message.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gui/message.cpp b/gui/message.cpp index 6f5d7d9e77..06b4524eab 100644 --- a/gui/message.cpp +++ b/gui/message.cpp @@ -58,7 +58,11 @@ MessageDialog::MessageDialog(const Common::String &message, const char *defaultB int maxlineWidth = g_gui.getFont().wordWrapText(message, screenW - 2 * 20, lines); // Calculate the desired dialog size (maxing out at 300*180 for now) - _w = MAX(maxlineWidth, buttonWidth) + 20; + if (altButton) + _w = MAX(maxlineWidth, (2 * buttonWidth) + 10) + 20; + else + _w = MAX(maxlineWidth, buttonWidth) + 20; + lineCount = lines.size(); _h = 16; |
