diff options
author | Simon Howard | 2012-03-01 20:26:56 +0000 |
---|---|---|
committer | Simon Howard | 2012-03-01 20:26:56 +0000 |
commit | 9ffd1cc4d4bbd2b2799cbd0bf927fc4f30aed63e (patch) | |
tree | 06e5d3599db4c7bec3bcc032a241424d0bccc7e3 /textscreen/txt_window.c | |
parent | 920ffea9b631e712ff0826911db01a76edbe7521 (diff) | |
download | chocolate-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_window.c')
-rw-r--r-- | textscreen/txt_window.c | 14 |
1 files changed, 13 insertions, 1 deletions
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, |