|
ncurses_init_pair(PHP 4 >= 4.0.7, PHP 5 < 5.3.0, PECL ncurses >= 1.0.0) ncurses_init_pair — Define a color pair Описание
int ncurses_init_pair
( int $pair
, int $fg
, int $bg
)
Defines or redefines the given color pair to have the given foreground and background colors. If the color pair was previously initialized, the screen is refreshed and all occurrences of it are changed to reflect the new definition. Color capabilities must be initialized using ncurses_start_color() before calling this function. The first color pair (color pair 0) is assumed to be white on black by default, but can be changed using ncurses_assume_default_colors(). Список параметров
Возвращаемые значенияReturns -1 if the function was successful, and 0 if ncurses or color support were not initialized. ПримечанияNote that color changing capabilities are not required for defining color pairs of pre-existing colors, but only for changing definitions (red, green, and blue components) of colors themselves per ncurses_init_color(). Примеры
Пример #1 Writing a string with a specified color to the screen
<?php Смотрите также
|
|