From 8b4ca4a30becd7a1f9f3c313a07bc987c6f8c1bf Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Sat, 25 Nov 2000 18:21:37 +0000 Subject: [PATCH] Make credits less jumpy git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@320 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- winio.c | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) 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; -- 2.39.5