1
0
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:
John Zaitseff 2011-07-04 18:22:24 +10:00
parent 10c4cb2a22
commit 9f6c2af671
2 changed files with 5 additions and 2 deletions

View File

@ -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);

View File

@ -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,