28 */ |
28 */ |
29 |
29 |
30 #include "input.h" |
30 #include "input.h" |
31 #include <ncurses.h> |
31 #include <ncurses.h> |
32 |
32 |
33 int prompt_yesno() { |
33 void init_colorpairs() { |
|
34 init_pair(COL_YB, COLOR_YELLOW, COLOR_BLUE); |
|
35 init_pair(COL_BW, COLOR_BLACK, COLOR_WHITE); |
|
36 init_pair(COL_WB, COLOR_WHITE, COLOR_BLACK); |
|
37 } |
|
38 |
|
39 int prompt_yesno(char *msg) { |
|
40 printw("%s (y/n)? ", msg); |
|
41 refresh(); |
34 noecho(); |
42 noecho(); |
35 int ch; |
43 int ch; |
36 do { |
44 do { |
37 ch = getch(); |
45 ch = getch(); |
38 } while (ch != 'y' && ch != 'n'); |
46 } while (ch != 'y' && ch != 'n'); |