]> _ Git - termbox2.git/commit
support default colors in non-`TB_OUTPUT_NORMAL` modes (#41)
authorAdam Saponara <as@php.net>
Sun, 18 Sep 2022 22:05:50 +0000 (18:05 -0400)
committerAdam Saponara <as@php.net>
Sun, 18 Sep 2022 22:05:50 +0000 (18:05 -0400)
commit846bba440ea276863aa9fa4b300d2cfe91844863
tree0dd07032158b84711e522e3df54341ae8eb4c5d3
parent3e4c167ff2fdebe9a0612c81cd028344ac2b6465
support default colors in non-`TB_OUTPUT_NORMAL` modes (#41)

`TB_DEFAULT` is now defined as a bitwise attribute similar to
`TB_BOLD`. previously it was defined as 0 which made it impossible to
use default colors in non-`TB_OUTPUT_NORMAL` modes.

for convenience and limited back-compat, 0 is still interpreted as
`TB_DEFAULT` in `TB_OUTPUT_NORMAL`, `TB_OUTPUT_216`, and
`TB_OUTPUT_GRAYSCALE`, though `TB_DEFAULT` may be used as well.

in `TB_OUTPUT_256` and `TB_OUTPUT_TRUECOLOR`, 0 is black, so
`TB_DEFAULT` and `TB_TRUECOLOR_DEFAULT` respectively must be used if
a default color is desired.
termbox.h
tests/test_basic/expected.ansi
tests/test_color_8bit/expected.ansi [new file with mode: 0644]
tests/test_color_8bit/test.php [new file with mode: 0755]
tests/test_color_true/expected.ansi
tests/test_color_true/test.php