X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=render.c;h=b0fb21a37183f6fd0f256d77fd01e3dce0f2c661;hb=8b6f14fe02e0bb9a851cf0e134fc109f311c2e4d;hp=de22b1d7571be1b744d0ce6748fc366423192311;hpb=b9f6674ee02c6eb557f2b4a1032774729aa67af0;p=taskasaur.git diff --git a/render.c b/render.c index de22b1d..b0fb21a 100644 --- a/render.c +++ b/render.c @@ -12,8 +12,7 @@ init_tscurses(void) { initscr(); cbreak(); - noecho(); - curs_set(0); + curs_off(); keypad(stdscr, TRUE); /* need to error check this */ @@ -44,7 +43,26 @@ init_tscolors(void) { init_pair(TS_SELECTED, selected_color, COLOR_BLACK); init_pair(TS_NONSELECTED, non_selected_color, COLOR_BLACK); + init_pair(TS_MENU_SELECTED, menu_selected_color, COLOR_BLACK); + init_pair(TS_MENU_NONSELECTED, menu_non_selected_color, COLOR_BLACK); + + return 0; +} + +/* cursor */ +int +curs_on(void) +{ + echo(); + curs_set(1); + return 0; +} +int +curs_off(void) +{ + noecho(); + curs_set(0); return 0; }