src/input.c

changeset 7
41468077b5bb
parent 3
3693fd2eb0e9
child 30
a285ee393860
equal deleted inserted replaced
6:daaf6e5b3501 7:41468077b5bb
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');

mercurial