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_window.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'textscreen/txt_window.c') diff --git a/textscreen/txt_window.c b/textscreen/txt_window.c index d33dd75b..b08ac658 100644 --- a/textscreen/txt_window.c +++ b/textscreen/txt_window.c @@ -26,6 +26,7 @@ #include "txt_desktop.h" #include "txt_gui.h" +#include "txt_io.h" #include "txt_main.h" #include "txt_separator.h" #include "txt_window.h" @@ -319,7 +320,18 @@ void TXT_DrawWindow(txt_window_t *window) txt_widget_t *widgets; TXT_LayoutWindow(window); - + + if (window->table.widget.focused) + { + TXT_BGColor(TXT_ACTIVE_WINDOW_BACKGROUND, 0); + } + else + { + TXT_BGColor(TXT_INACTIVE_WINDOW_BACKGROUND, 0); + } + + TXT_FGColor(TXT_COLOR_BRIGHT_WHITE); + // Draw the window TXT_DrawWindowFrame(window->title, -- cgit v1.2.3