make ui color configurable through a header file
Some checks are pending
Build Todd / build-linux (push) Waiting to run
Build Todd / build-mac (push) Waiting to run
Build Todd / build-windows (push) Waiting to run

This commit is contained in:
2024-11-10 01:18:17 +01:00
parent 25ef59e7f3
commit 14cc20f6c3
2 changed files with 19 additions and 4 deletions

8
main.c
View File

@@ -1,9 +1,9 @@
#include "engine/todo.h"
#include "color.h"
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ncurses.h>
#include <unistd.h>
#include <sys/types.h>
#include <pwd.h>
@@ -59,9 +59,9 @@ void initialize_curses(int *width, int *height) {
*height = th;
start_color();
init_pair(BORDERS_PAIR, COLOR_BLACK, COLOR_WHITE);
init_pair(DEFAULT_PAIR, COLOR_WHITE, COLOR_BLACK);
init_pair(COMPLETED_PAIR, COLOR_BLACK, COLOR_GREEN);
init_pair(BORDERS_PAIR, BORDERS_PRIMARY, BORDERS_SECONDARY);
init_pair(DEFAULT_PAIR, DEFAULT_PRIMARY, DEFAULT_SECONDARY);
init_pair(COMPLETED_PAIR, COMPLETED_PRIMARY, COMPLETED_SECONDARY);
// turn off echoing of keys, and enter cbreak mode,
// where no buffering is performed on keyboard input
cbreak();