Life Under Curses
uunet!bria!mike
uunet!bria!mike
Mon Feb 18 17:44:05 AEST 1991
In an article, brahms.udel.edu!boutell (Thomas B Boutell) writes:
>I'm the author of a moderately well- known Curses- based game (Broken
>Throne), and I know my way around the library pretty well, but there's
>one thing I *still* can't seem to do: force a total refresh of the
>screen. Not just the parts curses "knows" it has changed, EVERYTHING.
>I've run into the need for a redraw key.
Use touchwin(win) and then wrefresh(win); if for some reason your
curses library doesn't have 'em, then you can do something like this:
redrawsrc()
{
WINDOW *w;
w = newwin(24,80,0,0); /* create a temporary window */
overwrite(stdscr,w); /* copy stdscr to temp window */
wclear(stdscr); /* clear stdscr */
wrefresh(stdscr); /* and refresh */
overwrite(w,stdscr); /* copy the original stdscr back */
wrefresh(stdscr); /* refresh again */
delwin(w); /* dump the temp window */
}
Hope that this helps.
Cheers,
--
Michael Stefanik, MGI Inc., Los Angeles| Opinions stated are not even my own.
Title of the week: Systems Engineer | UUCP: ...!uunet!bria!mike
-------------------------------------------------------------------------------
Remember folks: If you can't flame MS-DOS, then what _can_ you flame?
More information about the Comp.unix.programmer
mailing list