diff options
| author | Franklin Wei <frankhwei536@gmail.com> | 2014-06-23 17:04:30 -0400 |
|---|---|---|
| committer | Franklin Wei <frankhwei536@gmail.com> | 2014-06-23 17:04:30 -0400 |
| commit | 7c3ee246fb626ab09b3b05055efdfaf3a00e60e7 (patch) | |
| tree | 231d914a2677fdf8e466c972b62b4d9632698aa9 /util.c | |
| parent | 35e1fd6820cd05c180e180d0ec61457a9f31e196 (diff) | |
| download | wargames-server-7c3ee246fb626ab09b3b05055efdfaf3a00e60e7.zip wargames-server-7c3ee246fb626ab09b3b05055efdfaf3a00e60e7.tar.gz wargames-server-7c3ee246fb626ab09b3b05055efdfaf3a00e60e7.tar.bz2 wargames-server-7c3ee246fb626ab09b3b05055efdfaf3a00e60e7.tar.xz | |
Fixed more bugs, added more features :)
Diffstat (limited to 'util.c')
| -rw-r--r-- | util.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -13,10 +13,19 @@ void allLower(char* str) } void print_string(const char* str) /* print string, slowly */ { + int window_height; + int junk; + getmaxyx(stdscr, window_height, junk); int i=0; while(str[i]) { addch(str[i]); + int cursx, cursy; + getyx(stdscr, cursy, cursx); + if(cursy==window_height) + { + scroll(stdscr); + } usleep(SLEEP_TIME); refresh(); ++i; |