mirror of
https://git.zap.org.au/git/trader.git
synced 2024-12-04 14:46:45 -05: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:
parent
82647cf691
commit
135842b87d
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user