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

pull/155/head
rubidium 15 years ago
parent 07f70fc801
commit bce8a0a4fe

@ -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;
}

Loading…
Cancel
Save