mirror of https://github.com/OpenTTD/OpenTTD.git
(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.
This commit is contained in:
parent
abb644771a
commit
d9fc6134d3
|
@ -1016,6 +1016,8 @@ void DrawEditBox(Window *w, querystr_d *string, int wid)
|
||||||
const Widget *wi = &w->widget[wid];
|
const Widget *wi = &w->widget[wid];
|
||||||
const Textbuf *tb = &string->text;
|
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 */
|
/* Limit the drawing of the string inside the widget boundaries */
|
||||||
if (!FillDrawPixelInfo(&dpi,
|
if (!FillDrawPixelInfo(&dpi,
|
||||||
wi->left + 4,
|
wi->left + 4,
|
||||||
|
@ -1024,8 +1026,6 @@ void DrawEditBox(Window *w, querystr_d *string, int wid)
|
||||||
wi->bottom - wi->top - 1)
|
wi->bottom - wi->top - 1)
|
||||||
) return;
|
) return;
|
||||||
|
|
||||||
GfxFillRect(wi->left + 1, wi->top + 1, wi->right - 1, wi->bottom - 1, 215);
|
|
||||||
|
|
||||||
old_dpi = _cur_dpi;
|
old_dpi = _cur_dpi;
|
||||||
_cur_dpi = &dpi;
|
_cur_dpi = &dpi;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue