diff options
| author | Oliver Kiehl | 2003-05-05 10:38:16 +0000 | 
|---|---|---|
| committer | Oliver Kiehl | 2003-05-05 10:38:16 +0000 | 
| commit | 37159f9b4ecc34345730eae81fb98c6162c5deb8 (patch) | |
| tree | 16a3e51963c585192a15afebc0f181ae169a5d82 | |
| parent | d12ff07ce21395d9510ce198d5f0daef35b04c42 (diff) | |
| download | scummvm-rg350-37159f9b4ecc34345730eae81fb98c6162c5deb8.tar.gz scummvm-rg350-37159f9b4ecc34345730eae81fb98c6162c5deb8.tar.bz2 scummvm-rg350-37159f9b4ecc34345730eae81fb98c6162c5deb8.zip  | |
fixed cursor placement
svn-id: r7343
| -rw-r--r-- | gui/EditTextWidget.cpp | 4 | 
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);  | 
