summaryrefslogtreecommitdiff
path: root/textscreen/txt_spinctrl.c
diff options
context:
space:
mode:
authorSimon Howard2012-03-01 20:26:56 +0000
committerSimon Howard2012-03-01 20:26:56 +0000
commit9ffd1cc4d4bbd2b2799cbd0bf927fc4f30aed63e (patch)
tree06e5d3599db4c7bec3bcc032a241424d0bccc7e3 /textscreen/txt_spinctrl.c
parent920ffea9b631e712ff0826911db01a76edbe7521 (diff)
downloadchocolate-doom-9ffd1cc4d4bbd2b2799cbd0bf927fc4f30aed63e.tar.gz
chocolate-doom-9ffd1cc4d4bbd2b2799cbd0bf927fc4f30aed63e.tar.bz2
chocolate-doom-9ffd1cc4d4bbd2b2799cbd0bf927fc4f30aed63e.zip
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
Diffstat (limited to 'textscreen/txt_spinctrl.c')
-rw-r--r--textscreen/txt_spinctrl.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/textscreen/txt_spinctrl.c b/textscreen/txt_spinctrl.c
index a4d20343..0b77805f 100644
--- a/textscreen/txt_spinctrl.c
+++ b/textscreen/txt_spinctrl.c
@@ -147,15 +147,17 @@ static void TXT_SpinControlDrawer(TXT_UNCAST_ARG(spincontrol))
TXT_CAST_ARG(txt_spincontrol_t, spincontrol);
unsigned int i;
unsigned int padding;
+ txt_saved_colors_t colors;
int focused;
focused = spincontrol->widget.focused;
TXT_FGColor(TXT_COLOR_BRIGHT_CYAN);
- TXT_BGColor(TXT_WINDOW_BACKGROUND, 0);
TXT_DrawString("\x1b ");
-
+
+ TXT_SaveColors(&colors);
+
TXT_FGColor(TXT_COLOR_BRIGHT_WHITE);
// Choose background color
@@ -193,8 +195,7 @@ static void TXT_SpinControlDrawer(TXT_UNCAST_ARG(spincontrol))
++i;
}
- TXT_FGColor(TXT_COLOR_BRIGHT_CYAN);
- TXT_BGColor(TXT_WINDOW_BACKGROUND, 0);
+ TXT_RestoreColors(&colors);
TXT_DrawString(" \x1a");
}