From: Chris Allegretta Date: Sat, 25 Nov 2000 18:21:37 +0000 (+0000) Subject: Make credits less jumpy X-Git-Tag: v0.9.22~55 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=8b4ca4a30becd7a1f9f3c313a07bc987c6f8c1bf;p=nano.git Make credits less jumpy git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@320 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/winio.c b/winio.c index d950ae98..be57ddca 100644 --- a/winio.c +++ b/winio.c @@ -1333,7 +1333,7 @@ void fix_editbot(void) #define CREDIT_LEN 43 void do_credits(void) { - int i, j = 0, place = 0, start_x; + int i, j = 0, k, place = 0, start_x; char *what; char *nanotext = _("The nano text editor"); @@ -1388,29 +1388,32 @@ void do_credits(void) nodelay(edit, TRUE); blank_bottombars(); mvwaddstr(topwin, 0, 0, hblank); + blank_edit(); + wrefresh(edit); wrefresh(bottomwin); wrefresh(topwin); while (wgetch(edit) == ERR) { - blank_edit(); - for (i = editwinrows / 2 - 1; i >= (editwinrows / 2 - 1 - j); i--) { - mvwaddstr(edit, i * 2, 0, hblank); - - if (place - (editwinrows / 2 - 1 - i) < CREDIT_LEN) - what = credits[place - (editwinrows / 2 - 1 - i)]; - else - what = ""; - - start_x = center_x - strlen(what) / 2 - 1; - mvwaddstr(edit, i * 2, start_x, what); + for (k = 0; k <= 1; k++) { + blank_edit(); + for (i = editwinrows / 2 - 1; i >= (editwinrows / 2 - 1 - j); i--) { + mvwaddstr(edit, i * 2 - k, 0, hblank); + + if (place - (editwinrows / 2 - 1 - i) < CREDIT_LEN) + what = credits[place - (editwinrows / 2 - 1 - i)]; + else + what = ""; + + start_x = center_x - strlen(what) / 2 - 1; + mvwaddstr(edit, i * 2 - k, start_x, what); + } + usleep(700000); + wrefresh(edit); } - if (j < editwinrows / 2 - 1) j++; place++; - wrefresh(edit); - sleep(1); if (place >= CREDIT_LEN + editwinrows / 2) break;