(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.
authorDarkvater
Sat, 13 Jan 2007 15:00:40 +0000
changeset 5639 c9c55071b0ea
parent 5638 ee1871005c80
child 5640 6a9ad17e5971
(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.
src/misc_gui.cpp
--- a/src/misc_gui.cpp	Sat Jan 13 15:00:16 2007 +0000
+++ b/src/misc_gui.cpp	Sat Jan 13 15:00:40 2007 +0000
@@ -1016,6 +1016,8 @@
 	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 @@
 	      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;