From 88e23fe50959ccc3e0321fa5983cb8b40bd804af Mon Sep 17 00:00:00 2001 From: ache Date: Thu, 14 Feb 2019 02:25:10 +0100 Subject: Runtime help --- wind.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'wind.c') diff --git a/wind.c b/wind.c index 2c42d60..20f6bdc 100644 --- a/wind.c +++ b/wind.c @@ -36,6 +36,28 @@ void resize() { CHECK(doupdate); move(LINES-1, 1); } +void runtimeHelp(void) { + int x = COLS/8; + int y = LINES/7; + + int w = COLS*2/7; + int h = LINES/7; + + clear(); + move(y,x); + printw("This is the help"); + y+=2; + move(y,0); + printw(RUNTIME_HELP_STRING); + + + move(LINES*6/7,x); + printw("Type h or q to exit"); + int c = 0; + while( (c = getch()) && c != EOF && !strchr("hHqQ", c) ) ; + + clear(); +} int confirmSend(char* txt, char* autheur) { int x = COLS/6; int y = LINES/3; @@ -73,14 +95,11 @@ int confirmSend(char* txt, char* autheur) { } } - - int c = 0; while( (c = getch()) && c != EOF && !strchr("oyneqOYNEQ", c) ) ; clear(); return (c == 'e' || c =='E') ? 2 : (!!strchr("yYoO", c)) ; - } -- cgit v1.2.3