note 27660 added to ref.ncurses

From: Date: Sat, 14 Dec 2002 20:37:52 +0000
Subject: note 27660 added to ref.ncurses
Groups: php.notes 
Request: Send a blank email to php-notes+get-40909@lists.php.net to get a copy of this message
This is from the examples that come with the latest release. From: php-4.3.0RC3/ext/ncurses/example1.php I found this useful... <?php $n=0; ncurses_init(); if(ncurses_has_colors()){ ncurses_start_color(); ncurses_init_pair(1,NCURSES_COLOR_RED,NCURSES_COLOR_BLACK); ncurses_init_pair(2,NCURSES_COLOR_GREEN,NCURSES_COLOR_BLACK); ncurses_init_pair(3,NCURSES_COLOR_YELLOW,NCURSES_COLOR_BLACK); ncurses_init_pair(4,NCURSES_COLOR_BLUE,NCURSES_COLOR_BLACK); ncurses_init_pair(5,NCURSES_COLOR_MAGENTA,NCURSES_COLOR_BLACK); ncurses_init_pair(6,NCURSES_COLOR_CYAN,NCURSES_COLOR_BLACK); ncurses_init_pair(7,NCURSES_COLOR_WHITE,NCURSES_COLOR_BLACK); } while(1){ for ($x=0; $x<80; $x++) { for ($y=0; $y<24; $y++) { $n++; ncurses_move($y,$x); ncurses_addch($n+64); ncurses_color_set($n%8); ncurses_refresh(); if($n>26)$n=0; } } ncurses_getch(); } ?> -- http://www.php.net/manual/en/ref.ncurses.php http://master.php.net/manage/user-notes.php?action=edit+27660 http://master.php.net/manage/user-notes.php?action=delete+27660 http://master.php.net/manage/user-notes.php?action=reject+27660

« previous php.notes (#40909) next »