This commit is contained in:
vrd
2023-02-14 14:21:02 +02:00
parent f0290d21da
commit b28cb604a2
+7 -6
View File
@@ -379,15 +379,15 @@ static void displayHelp()
{ {
WINDOW* help_tab = newwin(LINES, COLS, 0, 0); WINDOW* help_tab = newwin(LINES, COLS, 0, 0);
printw("%s\n", "Enter - focus the currently selected person", waddstr(help_tab, "Enter - focus the currently selected person\n"
"Arrow keys - move the camera", "Arrow keys - move the camera\n"
"H, J, K, L - move the selection", "H, J, K, L - move the selection\n"
"I - display info about the selected person"); "I - display info about the selected person\n");
mvwaddstr(help_tab, LINES-1, 0, "Press any key to return."); mvwaddstr(help_tab, LINES-1, 0, "Press any key to return.");
wrefresh(help_tab); wrefresh(help_tab);
getch(); /* waint press */ getch(); /* wait press */
werase(help_tab); werase(help_tab);
wrefresh(help_tab); /* todo: dont update */ wrefresh(help_tab); /* todo: dont update */
@@ -397,7 +397,7 @@ static void displayHelp()
void Tree::display() void Tree::display()
{ {
draw(); draw(); /* todo: draw every time */
I32 c; I32 c;
do do
@@ -408,6 +408,7 @@ void Tree::display()
{ {
case KEY_F(1): case KEY_F(1):
displayHelp(); displayHelp();
draw();
break; break;
case '\n': case '\n':
focused_ = selected_; focused_ = selected_;