(svn r15843) -Codechange: with RTL the caret would always be drawn at the end of the textbox.

This commit is contained in:
rubidium 2009-03-25 00:28:57 +00:00
parent 4ad9dda5a0
commit 4a500bbcdb
1 changed files with 4 additions and 1 deletions

View File

@ -1064,7 +1064,10 @@ void QueryString::DrawEditBox(Window *w, int wid)
if (tb->caretxoffs + delta < 0) delta = -tb->caretxoffs;
DrawString(delta, tb->width, 0, tb->buf, TC_YELLOW);
if (HasEditBoxFocus(w, wid) && tb->caret) DrawString(tb->caretxoffs + delta, tb->width + 10, 0, "_", TC_WHITE);
if (HasEditBoxFocus(w, wid) && tb->caret) {
int caret_width = GetStringBoundingBox("_").width;
DrawString(tb->caretxoffs + delta, tb->caretxoffs + delta + caret_width, 0, "_", TC_WHITE);
}
_cur_dpi = old_dpi;
}