From b28cb604a258fae892e93b629a0879004c116b0a Mon Sep 17 00:00:00 2001 From: Venelin Date: Tue, 14 Feb 2023 14:21:02 +0200 Subject: [PATCH] help --- tree.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tree.cpp b/tree.cpp index 3b866a4..18337ee 100644 --- a/tree.cpp +++ b/tree.cpp @@ -379,15 +379,15 @@ static void displayHelp() { WINDOW* help_tab = newwin(LINES, COLS, 0, 0); - printw("%s\n", "Enter - focus the currently selected person", - "Arrow keys - move the camera", - "H, J, K, L - move the selection", - "I - display info about the selected person"); + waddstr(help_tab, "Enter - focus the currently selected person\n" + "Arrow keys - move the camera\n" + "H, J, K, L - move the selection\n" + "I - display info about the selected person\n"); mvwaddstr(help_tab, LINES-1, 0, "Press any key to return."); wrefresh(help_tab); - getch(); /* waint press */ + getch(); /* wait press */ werase(help_tab); wrefresh(help_tab); /* todo: dont update */ @@ -397,7 +397,7 @@ static void displayHelp() void Tree::display() { - draw(); + draw(); /* todo: draw every time */ I32 c; do @@ -408,6 +408,7 @@ void Tree::display() { case KEY_F(1): displayHelp(); + draw(); break; case '\n': focused_ = selected_;