From 9ffd1cc4d4bbd2b2799cbd0bf927fc4f30aed63e Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Thu, 1 Mar 2012 20:26:56 +0000 Subject: Rework the way that window background colors are set, and change the background color of inactive windows to black, to give better contrast when viewing many layered windows. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2507 --- textscreen/txt_label.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'textscreen/txt_label.c') diff --git a/textscreen/txt_label.c b/textscreen/txt_label.c index c4238bf3..39ea0e16 100644 --- a/textscreen/txt_label.c +++ b/textscreen/txt_label.c @@ -47,8 +47,14 @@ static void TXT_LabelDrawer(TXT_UNCAST_ARG(label)) w = label->widget.w; - TXT_BGColor(label->bgcolor, 0); - TXT_FGColor(label->fgcolor); + if (label->bgcolor >= 0) + { + TXT_BGColor(label->bgcolor, 0); + } + if (label->fgcolor >= 0) + { + TXT_FGColor(label->fgcolor); + } TXT_GetXY(&origin_x, &origin_y); @@ -181,8 +187,8 @@ txt_label_t *TXT_NewLabel(char *text) // Default colors - label->bgcolor = TXT_WINDOW_BACKGROUND; - label->fgcolor = TXT_COLOR_BRIGHT_WHITE; + label->bgcolor = -1; + label->fgcolor = -1; TXT_SetLabel(label, text); -- cgit v1.2.3