aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Kiehl2003-05-05 10:38:16 +0000
committerOliver Kiehl2003-05-05 10:38:16 +0000
commit37159f9b4ecc34345730eae81fb98c6162c5deb8 (patch)
tree16a3e51963c585192a15afebc0f181ae169a5d82
parentd12ff07ce21395d9510ce198d5f0daef35b04c42 (diff)
downloadscummvm-rg350-37159f9b4ecc34345730eae81fb98c6162c5deb8.tar.gz
scummvm-rg350-37159f9b4ecc34345730eae81fb98c6162c5deb8.tar.bz2
scummvm-rg350-37159f9b4ecc34345730eae81fb98c6162c5deb8.zip
fixed cursor placement
svn-id: r7343
-rw-r--r--gui/EditTextWidget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/gui/EditTextWidget.cpp b/gui/EditTextWidget.cpp
index 6ae43d0100..66dc654b8f 100644
--- a/gui/EditTextWidget.cpp
+++ b/gui/EditTextWidget.cpp
@@ -142,8 +142,8 @@ void EditTextWidget::drawCaret(bool erase) {
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);