[Scummvm-cvs-logs] SF.net SVN: scummvm:[48552] scummvm/branches/branch-1-1-0/gui/editable.cpp
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Mon Apr 5 14:44:28 CEST 2010
Revision: 48552
http://scummvm.svn.sourceforge.net/scummvm/?rev=48552&view=rev
Author: lordhoto
Date: 2010-04-05 12:44:27 +0000 (Mon, 05 Apr 2010)
Log Message:
-----------
Backport of r48551: "Commit of patch #2980691 "GSoC: GUI: Caret blink shaves pixels [...] (bug #2951681)"."
Modified Paths:
--------------
scummvm/branches/branch-1-1-0/gui/editable.cpp
Modified: scummvm/branches/branch-1-1-0/gui/editable.cpp
===================================================================
--- scummvm/branches/branch-1-1-0/gui/editable.cpp 2010-04-05 12:41:08 UTC (rev 48551)
+++ scummvm/branches/branch-1-1-0/gui/editable.cpp 2010-04-05 12:44:27 UTC (rev 48552)
@@ -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