fix example
This commit is contained in:
@@ -375,6 +375,26 @@ void Tree::removeRelation(const unsigned first, const unsigned second)
|
||||
}
|
||||
}
|
||||
|
||||
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");
|
||||
|
||||
mvwaddstr(help_tab, LINES-1, 0, "Press any key to return.");
|
||||
|
||||
wrefresh(help_tab);
|
||||
getch(); /* waint press */
|
||||
|
||||
werase(help_tab);
|
||||
wrefresh(help_tab); /* todo: dont update */
|
||||
delwin(help_tab);
|
||||
|
||||
}
|
||||
|
||||
void Tree::display()
|
||||
{
|
||||
draw();
|
||||
@@ -386,6 +406,9 @@ void Tree::display()
|
||||
|
||||
switch(c)
|
||||
{
|
||||
case KEY_F(1):
|
||||
displayHelp();
|
||||
break;
|
||||
case '\n':
|
||||
focused_ = selected_;
|
||||
draw();
|
||||
|
||||
Reference in New Issue
Block a user