[Scummvm-cvs-logs] SF.net SVN: scummvm:[53114] scummvm/trunk/gui/message.cpp

strangerke at users.sourceforge.net strangerke at users.sourceforge.net
Sun Oct 10 12:32:59 CEST 2010


Revision: 53114
          http://scummvm.svn.sourceforge.net/scummvm/?rev=53114&view=rev
Author:   strangerke
Date:     2010-10-10 10:32:58 +0000 (Sun, 10 Oct 2010)

Log Message:
-----------
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.

Modified Paths:
--------------
    scummvm/trunk/gui/message.cpp

Modified: scummvm/trunk/gui/message.cpp
===================================================================
--- scummvm/trunk/gui/message.cpp	2010-10-10 10:26:49 UTC (rev 53113)
+++ scummvm/trunk/gui/message.cpp	2010-10-10 10:32:58 UTC (rev 53114)
@@ -58,7 +58,11 @@
 	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;


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