diff options
author | michi_cc <michi_cc@openttd.org> | 2013-08-05 20:37:22 +0000 |
---|---|---|
committer | michi_cc <michi_cc@openttd.org> | 2013-08-05 20:37:22 +0000 |
commit | 64d2fc4d1e4124a55ccee8c4a4c6e43d1c2ae9fe (patch) | |
tree | 90f51bd4c12f00dbd8daac0075d25a1972f85329 /src/misc_gui.cpp | |
parent | cbdfd31a3c4607501d3869af87695b524b51a911 (diff) | |
download | openttd-64d2fc4d1e4124a55ccee8c4a4c6e43d1c2ae9fe.tar.xz |
(svn r25683) -Add: Support for a marked/selected range to the textbuf.
Diffstat (limited to 'src/misc_gui.cpp')
-rw-r--r-- | src/misc_gui.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index 37a317733..cd1f034a8 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -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) { |