mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 07:29:44 +00:00
(svn r15843) -Codechange: with RTL the caret would always be drawn at the end of the textbox.
This commit is contained in:
parent
4ad9dda5a0
commit
4a500bbcdb
@ -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…
Reference in New Issue
Block a user