(svn r25683) -Add: Support for a marked/selected range to the textbuf.

This commit is contained in:
michi_cc
2013-08-05 20:37:22 +00:00
parent cbdfd31a3c
commit 64d2fc4d1e
4 changed files with 68 additions and 0 deletions

View File

@@ -775,6 +775,9 @@ void QueryString::DrawEditBox(const Window *w, int wid) const
if (tb->caretxoffs + delta < 0) delta = -tb->caretxoffs;
/* If we have a marked area, draw a background highlight. */
if (tb->marklength != 0) GfxFillRect(delta + tb->markxoffs, 0, delta + tb->markxoffs + tb->marklength - 1, bottom - top, PC_GREY);
DrawString(delta, tb->pixels, 0, tb->buf, TC_YELLOW);
bool focussed = w->IsWidgetGloballyFocused(wid) || IsOSKOpenedFor(w, wid);
if (focussed && tb->caret) {