1
0
mirror of https://git.zap.org.au/git/trader.git synced 2024-07-21 16:14:14 -04:00

Bug fix for non-colour mode

If the background has A_REVERSE, then A_NORMAL will have no effect.  For
that reason, specify A_NORMAL as the default background after creating a
new window.
This commit is contained in:
John Zaitseff 2011-08-16 16:25:28 +10:00
parent 82647cf691
commit 135842b87d
2 changed files with 8 additions and 1 deletions

View File

@ -86,6 +86,7 @@ struct convspec {
************************************************************************/
WINDOW *curwin = NULL; // Top-most (current) window
bool use_color = true; // True to use colour
// Character renditions (attributes) used by Star Traders
@ -293,7 +294,8 @@ void init_screen (void)
raw();
// Initialise all character renditions used in the game
if (! option_no_color && has_colors()) {
use_color = ! option_no_color && has_colors();
if (use_color) {
start_color();
init_pair(1, COLOR_BLACK, COLOR_WHITE);
@ -491,6 +493,10 @@ WINDOW *newtxwin (int nlines, int ncols, int begin_y, int begin_x,
box(win, 0, 0);
}
if (! use_color) {
wbkgdset(win, A_NORMAL);
}
return win;
}

View File

@ -118,6 +118,7 @@ typedef enum curs_type {
************************************************************************/
extern WINDOW *curwin; // Top-most (current) window
extern bool use_color; // True to use colour
// Character renditions (attributes) used by Star Traders