aboutsummaryrefslogtreecommitdiffstats
path: root/help_scr.c
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2012-02-05 19:06:21 +0000
committerJonathan McCrohan <jmccrohan@gmail.com>2012-02-05 19:06:21 +0000
commit4aa11b915e718d739d7bbfc737b77164d79af116 (patch)
tree4cd88e5cca9df66f069a2eb1b639ec0ad938948c /help_scr.c
parentc93ad1a4ef2625ffb849b8868fe32f930594ac70 (diff)
parentf3410da7f0bd208a5f2d792131b215454e782e93 (diff)
downloadwavemon-4aa11b915e718d739d7bbfc737b77164d79af116.tar.gz
Resolve 0.7.3 import conflict
Diffstat (limited to '')
-rw-r--r--help_scr.c29
1 files changed, 11 insertions, 18 deletions
diff --git a/help_scr.c b/help_scr.c
index 3f69e6c..5cde8c2 100644
--- a/help_scr.c
+++ b/help_scr.c
@@ -19,29 +19,22 @@
*/
#include "wavemon.h"
-enum wavemon_screen scr_help(WINDOW *w_menu)
-{
- WINDOW *w_help;
- int key = 0;
+/* GLOBALS */
+static WINDOW *w_help;
+void scr_help_init(void)
+{
w_help = newwin_title(0, WAV_HEIGHT, "Help", false);
-
waddstr_center(w_help, WAV_HEIGHT/2 - 1, "don't panic.");
-
wrefresh(w_help);
+}
- while (key < KEY_F(1) || key > KEY_F(10)) {
- while ((key = wgetch(w_menu)) <= 0)
- usleep(5000);
-
- /* Keyboard shortcuts */
- if (key == 'q')
- key = KEY_F(10);
- else if (key == 'i')
- key = KEY_F(1);
- }
+int scr_help_loop(WINDOW *w_menu)
+{
+ return wgetch(w_menu);
+}
+void scr_help_fini(void)
+{
delwin(w_help);
-
- return key - KEY_F(1);
}