Properly update cursor position when the list is scrolled.

This commit is contained in:
Eric Melville 2001-07-26 05:35:19 +00:00
parent 362f39c0e6
commit 5dc547c27e
2 changed files with 12 additions and 8 deletions

View File

@ -300,9 +300,10 @@ dialog_checklist(unsigned char *title, unsigned char *prompt, int height, int wi
scroll--;
print_item(list, items[scroll*3], items[scroll*3 + 1], status[scroll], 0,
TRUE, DREF(ditems, scroll), list_width, item_x, check_x);
wnoutrefresh(list);
print_arrows(dialog, scroll, list_height, item_no, box_x, box_y, check_x + 4, cur_x, cur_y);
wrefresh(dialog);
wmove(list, choice, check_x+1);
wnoutrefresh(dialog);
wrefresh(list);
}
continue; /* wait for another key press */
}
@ -329,9 +330,10 @@ dialog_checklist(unsigned char *title, unsigned char *prompt, int height, int wi
items[(scroll + max_choice - 1) * 3 + 1],
status[scroll + max_choice - 1], max_choice - 1, TRUE,
DREF(ditems, scroll + max_choice - 1), list_width, item_x, check_x);
wnoutrefresh(list);
print_arrows(dialog, scroll, list_height, item_no, box_x, box_y, check_x + 4, cur_x, cur_y);
wrefresh(dialog);
wmove(list, choice, check_x+1);
wnoutrefresh(dialog);
wrefresh(list);
}
continue; /* wait for another key press */
}

View File

@ -312,9 +312,10 @@ dialog_radiolist(unsigned char *title, unsigned char *prompt, int height, int wi
scroll--;
print_item(list, items[scroll*3], items[scroll*3 + 1], status[scroll], 0,
TRUE, DREF(ditems, scroll));
wnoutrefresh(list);
print_arrows(dialog, scroll, list_height, item_no, box_x, box_y, check_x + 4, cur_x, cur_y);
wrefresh(dialog);
wmove(list, choice, check_x+1);
wnoutrefresh(dialog);
wrefresh(list);
}
continue; /* wait for another key press */
}
@ -341,9 +342,10 @@ dialog_radiolist(unsigned char *title, unsigned char *prompt, int height, int wi
items[(scroll + max_choice - 1) * 3 + 1],
status[scroll + max_choice - 1], max_choice - 1,
TRUE, DREF(ditems, scroll + max_choice - 1));
wnoutrefresh(list);
print_arrows(dialog, scroll, list_height, item_no, box_x, box_y, check_x + 4, cur_x, cur_y);
wrefresh(dialog);
wmove(list, choice, check_x+1);
wnoutrefresh(dialog);
wrefresh(list);
}
continue; /* wait for another key press */
}