Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ ifeq ($(amdgpu), 1)
CFLAGS += -DENABLE_AMDGPU=1
endif

# add transparent background
ifeq ($(transparent), 1)
CFLAGS += -DENABLE_TRANSPARENT=1
endif

ifndef plain
ifdef debug
CFLAGS += -g
Expand Down
9 changes: 9 additions & 0 deletions ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,20 @@ void present(const unsigned int ticks, const char card[], unsigned int color) {
clear();

start_color();
#ifdef ENABLE_TRANSPARENT
use_default_colors();

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use_default_colors is being called here. And yeah, I don't really if it's a good thing to default to -1 tho.

init_pair(1, COLOR_GREEN, -1);
init_pair(2, COLOR_RED, -1);
init_pair(3, COLOR_CYAN, -1);
init_pair(4, COLOR_MAGENTA, -1);
init_pair(5, COLOR_YELLOW, -1);
#else
init_pair(1, COLOR_GREEN, COLOR_BLACK);
init_pair(2, COLOR_RED, COLOR_BLACK);
init_pair(3, COLOR_CYAN, COLOR_BLACK);
init_pair(4, COLOR_MAGENTA, COLOR_BLACK);
init_pair(5, COLOR_YELLOW, COLOR_BLACK);
#endif

const unsigned int bigh = 23;

Expand Down