mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-18 07:53:12 +00:00
GUI: Ensure that the message dialog is wide enough
The Hugo engine currently uses the message dialog. Make sure that the dialog is always at least wide enough to hold the "Ok" button. svn-id: r53107
This commit is contained in:
parent
ced1aba1ea
commit
25dac76b35
@ -58,7 +58,10 @@ 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 = maxlineWidth + 20;
|
||||
if (maxlineWidth > buttonWidth)
|
||||
_w = maxlineWidth + 20;
|
||||
else
|
||||
_w = buttonWidth + 20;
|
||||
lineCount = lines.size();
|
||||
|
||||
_h = 16;
|
||||
|
Loading…
x
Reference in New Issue
Block a user