mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-20 03:25:47 +00:00
notcurses: color up warning diagnostics
This commit is contained in:
parent
9923b69296
commit
60fe544a33
@ -102,7 +102,7 @@ about_toggle(struct notcurses* nc){
|
|||||||
ncplane_set_bg(n, 0);
|
ncplane_set_bg(n, 0);
|
||||||
ncplane_set_bg_alpha(n, CELL_ALPHA_BLEND);
|
ncplane_set_bg_alpha(n, CELL_ALPHA_BLEND);
|
||||||
ncplane_printf_aligned(n, 1, NCALIGN_CENTER, "notcurses-demo %s", notcurses_version());
|
ncplane_printf_aligned(n, 1, NCALIGN_CENTER, "notcurses-demo %s", notcurses_version());
|
||||||
ncplane_printf_aligned(n, 3, NCALIGN_LEFT, " Q quit");
|
ncplane_printf_aligned(n, 3, NCALIGN_LEFT, " q quit");
|
||||||
ncplane_printf_aligned(n, 3, NCALIGN_RIGHT, "restart Ctrl+R ");
|
ncplane_printf_aligned(n, 3, NCALIGN_RIGHT, "restart Ctrl+R ");
|
||||||
ncplane_printf_aligned(n, 4, NCALIGN_LEFT, " H toggle HUD");
|
ncplane_printf_aligned(n, 4, NCALIGN_LEFT, " H toggle HUD");
|
||||||
ncplane_printf_aligned(n, 4, NCALIGN_RIGHT, "toggle help Ctrl+U ");
|
ncplane_printf_aligned(n, 4, NCALIGN_RIGHT, "toggle help Ctrl+U ");
|
||||||
|
@ -942,14 +942,11 @@ notcurses* notcurses_init(const notcurses_options* opts, FILE* outfp){
|
|||||||
putp(tiparm(ret->setaf, 3));
|
putp(tiparm(ret->setaf, 3));
|
||||||
fprintf(ret->ttyfp, " Warning! Built without ffmpeg support\n");
|
fprintf(ret->ttyfp, " Warning! Built without ffmpeg support\n");
|
||||||
#endif
|
#endif
|
||||||
term_fg_palindex(ret, ret->ttyfp, ret->RGBflag ? 0xe02080 : 3);
|
term_fg_palindex(ret, ret->ttyfp, ret->colors <= 256 ? 1 % ret->colors : 0xd0a0a0);
|
||||||
if(!ret->RGBflag){ // FIXME
|
if(!ret->RGBflag){ // FIXME
|
||||||
fprintf(ret->ttyfp, "\n Warning! Colors subject to https://github.com/dankamongmen/notcurses/issues/4");
|
fprintf(ret->ttyfp, "\n Warning! Colors subject to https://github.com/dankamongmen/notcurses/issues/4");
|
||||||
fprintf(ret->ttyfp, "\n Specify a (correct) DirectColor TERM, or COLORTERM.\n");
|
fprintf(ret->ttyfp, "\n Specify a (correct) DirectColor TERM, or COLORTERM.\n");
|
||||||
}else{
|
}else{
|
||||||
/*if((unsigned)ret->colors < (1u << 24u)){
|
|
||||||
fprintf(ret->ttyfp, "\n Warning! Advertised DirectColor but only %d colors\n", ret->colors);
|
|
||||||
}*/
|
|
||||||
if(!ret->CCCflag){
|
if(!ret->CCCflag){
|
||||||
fprintf(ret->ttyfp, "\n Warning! Advertised DirectColor but no 'ccc' flag\n");
|
fprintf(ret->ttyfp, "\n Warning! Advertised DirectColor but no 'ccc' flag\n");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user