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

tanoku at users.sourceforge.net tanoku at users.sourceforge.net
Mon Oct 13 12:04:44 CEST 2008


Revision: 34792
          http://scummvm.svn.sourceforge.net/scummvm/?rev=34792&view=rev
Author:   tanoku
Date:     2008-10-13 10:04:42 +0000 (Mon, 13 Oct 2008)

Log Message:
-----------
Fixed: Ingame debug console in all games.

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

Modified: scummvm/trunk/gui/console.cpp
===================================================================
--- scummvm/trunk/gui/console.cpp	2008-10-13 06:29:14 UTC (rev 34791)
+++ scummvm/trunk/gui/console.cpp	2008-10-13 10:04:42 UTC (rev 34792)
@@ -109,6 +109,8 @@
 	// Calculate the real width/height (rounded to char/line multiples)
 	_w = (uint16)(_widthPercent * screenW);
 	_h = (uint16)((_heightPercent * screenH - 2) / kConsoleLineHeight);
+	
+	_w = _w - _w / 20;
 	_h = _h * kConsoleLineHeight + 2;
 
 	// Set scrollbar dimensions
@@ -144,11 +146,14 @@
 	// Calculate the real width/height (rounded to char/line multiples)
 	uint16 w = (uint16)(_widthPercent * screenW);
 	uint16 h = (uint16)((_heightPercent * screenH - 2) / kConsoleLineHeight);
+	
 	h = h * kConsoleLineHeight + 2;
+	w = w - w / 20;
 
 	if (_w != w || _h != h)
 		init();
 
+	_x = _w / 40;
 	_y = -_h;
 	_slideTime = g_system->getMillis();
 	_slideMode = kDownSlideMode;
@@ -165,7 +170,7 @@
 }
 
 void ConsoleDialog::drawDialog() {
-	g_gui.theme()->drawDialogBackground(Common::Rect(_x, _y, _x+_w, _y+_h), _backgroundType);
+	g_gui.theme()->drawDialogBackground(Common::Rect(_x, _y, _x + _w, _y + _h), Theme::kDialogBackgroundPlain/*_backgroundType*/);
 	// FIXME: for the old theme the frame around the console vanishes
 	// when any action is processed if we enable this
 	// _drawingHints &= ~THEME_HINT_FIRST_DRAW;
@@ -201,6 +206,8 @@
 		g_gui.theme()->drawChar(Common::Rect(x, y, x+kConsoleCharWidth, y+kConsoleLineHeight), c, _font);
 		x += kConsoleCharWidth;
 	}
+	
+	g_gui.theme()->updateScreen();
 }
 
 void ConsoleDialog::reflowLayout() {


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