summaryrefslogtreecommitdiff
path: root/src/misc_gui.cpp
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2007-01-13 15:00:40 +0000
committerDarkvater <Darkvater@openttd.org>2007-01-13 15:00:40 +0000
commit989033131c72bd9d2421a8b25661057227258271 (patch)
treeb5fae0481f482f51f67aa085a1bcc7746b98c180 /src/misc_gui.cpp
parente043c6cef7b8afb694a528218c18a15bae3b5315 (diff)
downloadopenttd-989033131c72bd9d2421a8b25661057227258271.tar.xz
(svn r8098) -Fix (r6964): For editboxen, always fill the background with black, and not only after a valid call to FillDrawPixelInfo. This solves some graphics glitches with background widget-colour showing through on frequent redraws.
Diffstat (limited to 'src/misc_gui.cpp')
-rw-r--r--src/misc_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp
index fab2129e2..0c33fa831 100644
--- a/src/misc_gui.cpp
+++ b/src/misc_gui.cpp
@@ -1016,6 +1016,8 @@ void DrawEditBox(Window *w, querystr_d *string, int wid)
const Widget *wi = &w->widget[wid];
const Textbuf *tb = &string->text;
+ GfxFillRect(wi->left + 1, wi->top + 1, wi->right - 1, wi->bottom - 1, 215);
+
/* Limit the drawing of the string inside the widget boundaries */
if (!FillDrawPixelInfo(&dpi,
wi->left + 4,
@@ -1024,8 +1026,6 @@ void DrawEditBox(Window *w, querystr_d *string, int wid)
wi->bottom - wi->top - 1)
) return;
- GfxFillRect(wi->left + 1, wi->top + 1, wi->right - 1, wi->bottom - 1, 215);
-
old_dpi = _cur_dpi;
_cur_dpi = &dpi;