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

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Mon Apr 5 14:41:09 CEST 2010


Revision: 48551
          http://scummvm.svn.sourceforge.net/scummvm/?rev=48551&view=rev
Author:   lordhoto
Date:     2010-04-05 12:41:08 +0000 (Mon, 05 Apr 2010)

Log Message:
-----------
Commit of patch #2980691 "GSoC: GUI: Caret blink shaves pixels [...] (bug #2951681)".

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

Modified: scummvm/trunk/gui/editable.cpp
===================================================================
--- scummvm/trunk/gui/editable.cpp	2010-04-05 12:29:36 UTC (rev 48550)
+++ scummvm/trunk/gui/editable.cpp	2010-04-05 12:41:08 UTC (rev 48551)
@@ -249,6 +249,14 @@
 
 	g_gui.theme()->drawCaret(Common::Rect(x, y, x + 1, y + editRect.height() - 2), erase);
 
+	if (erase) {
+		if ((uint)_caretPos < _editString.size()) {
+			GUI::EditableWidget::String chr(_editString[_caretPos]);
+			int chrWidth = g_gui.getCharWidth(_editString[_caretPos], _font);
+			g_gui.theme()->drawText(Common::Rect(x, y, x + chrWidth, y + editRect.height() - 2), chr, _state, Graphics::kTextAlignLeft, ThemeEngine::kTextInversionNone, 0, false, _font);
+		}
+	}
+
 	_caretVisible = !erase;
 }
 


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