[Scummvm-cvs-logs] CVS: scummvm/gui EditTextWidget.cpp,1.10,1.11
Oliver Kiehl
olki at users.sourceforge.net
Mon May 5 03:39:10 CEST 2003
Update of /cvsroot/scummvm/scummvm/gui
In directory sc8-pr-cvs1:/tmp/cvs-serv30513/gui
Modified Files:
EditTextWidget.cpp
Log Message:
fixed cursor placement
Index: EditTextWidget.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/EditTextWidget.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- EditTextWidget.cpp 5 May 2003 09:48:23 -0000 1.10
+++ EditTextWidget.cpp 5 May 2003 10:38:16 -0000 1.11
@@ -142,8 +142,8 @@
for (int i = 0; i < _pos; i++)
width += gui->getCharWidth(_label[i]);
- if (width > _w - 6)
- width = _w - 6;
+ if (gui->getStringWidth(_label) - (_w - 6) > 0)
+ width -= gui->getStringWidth(_label) - (_w - 6);
x += width;
gui->vline(x, y, y + kLineHeight, color);
More information about the Scummvm-git-logs
mailing list