mirror of
https://git.zap.org.au/git/trader.git
synced 2025-01-03 14:57:41 -05:00
Define ATTR: select between attributes for colour and mono screens
This commit is contained in:
parent
10c4cb2a22
commit
9f6c2af671
@ -107,8 +107,7 @@ void init_screen (void)
|
||||
|
||||
clear();
|
||||
|
||||
attrset(has_colors() ? COLOR_PAIR(YELLOW_ON_CYAN) | A_BOLD :
|
||||
A_REVERSE | A_BOLD);
|
||||
attrset(ATTR(COLOR_PAIR(YELLOW_ON_CYAN) | A_BOLD, A_REVERSE | A_BOLD));
|
||||
center(stdscr, 0, true, PACKAGE_NAME);
|
||||
attrset(A_NORMAL);
|
||||
|
||||
|
@ -56,6 +56,10 @@
|
||||
#define COL_CENTER(x) ((COLS - (x)) / 2)
|
||||
|
||||
|
||||
// Colour and non-colour attribute selection
|
||||
#define ATTR(color, nocolor) (has_colors() ? (color) : (nocolor))
|
||||
|
||||
|
||||
// Colour pairs used in Star Traders
|
||||
enum color_pairs {
|
||||
DEFAULT_COLORS = 0,
|
||||
|
Loading…
Reference in New Issue
Block a user