[Scummvm-cvs-logs] SF.net SVN: scummvm:[53107] scummvm/trunk/gui/message.cpp
eriktorbjorn at users.sourceforge.net
eriktorbjorn at users.sourceforge.net
Sun Oct 10 10:13:26 CEST 2010
Revision: 53107
http://scummvm.svn.sourceforge.net/scummvm/?rev=53107&view=rev
Author: eriktorbjorn
Date: 2010-10-10 08:13:26 +0000 (Sun, 10 Oct 2010)
Log Message:
-----------
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.
Modified Paths:
--------------
scummvm/trunk/gui/message.cpp
Modified: scummvm/trunk/gui/message.cpp
===================================================================
--- scummvm/trunk/gui/message.cpp 2010-10-10 07:43:42 UTC (rev 53106)
+++ scummvm/trunk/gui/message.cpp 2010-10-10 08:13:26 UTC (rev 53107)
@@ -58,7 +58,10 @@
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;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list