mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-06 03:20:26 +00:00
demo: make the HUD more readable
This commit is contained in:
parent
7811663223
commit
73bd0785a5
@ -51,9 +51,9 @@ static int
|
|||||||
hud_standard_bg(struct ncplane* n){
|
hud_standard_bg(struct ncplane* n){
|
||||||
uint64_t channels = 0;
|
uint64_t channels = 0;
|
||||||
channels_set_fg_alpha(&channels, CELL_ALPHA_BLEND);
|
channels_set_fg_alpha(&channels, CELL_ALPHA_BLEND);
|
||||||
channels_set_fg_rgb(&channels, 0xff, 0xff, 0xff);
|
channels_set_fg_rgb(&channels, 0x80, 0x80, 0x80);
|
||||||
channels_set_bg_alpha(&channels, CELL_ALPHA_BLEND);
|
channels_set_bg_alpha(&channels, CELL_ALPHA_BLEND);
|
||||||
channels_set_bg_rgb(&channels, 0xff, 0xff, 0xff);
|
channels_set_bg_rgb(&channels, 0x80, 0x80, 0x80);
|
||||||
if(ncplane_set_base(n, "", 0, channels) >= 0){
|
if(ncplane_set_base(n, "", 0, channels) >= 0){
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -298,7 +298,7 @@ hud_print_finished(elem* list){
|
|||||||
ncplane_base(hud, &c);
|
ncplane_base(hud, &c);
|
||||||
ncplane_set_bg(hud, cell_bg(&c));
|
ncplane_set_bg(hud, cell_bg(&c));
|
||||||
ncplane_set_bg_alpha(hud, CELL_ALPHA_BLEND);
|
ncplane_set_bg_alpha(hud, CELL_ALPHA_BLEND);
|
||||||
ncplane_set_fg(hud, 0);
|
ncplane_set_fg(hud, 0xffffff);
|
||||||
ncplane_set_fg_alpha(hud, CELL_ALPHA_OPAQUE);
|
ncplane_set_fg_alpha(hud, CELL_ALPHA_OPAQUE);
|
||||||
cell_release(hud, &c);
|
cell_release(hud, &c);
|
||||||
if(ncplane_printf_yx(hud, line, 1, "%d", e->frames) < 0){
|
if(ncplane_printf_yx(hud, line, 1, "%d", e->frames) < 0){
|
||||||
@ -498,7 +498,7 @@ int demo_render(struct notcurses* nc){
|
|||||||
ncplane_base(hud, &c);
|
ncplane_base(hud, &c);
|
||||||
ncplane_set_bg(hud, cell_bg(&c));
|
ncplane_set_bg(hud, cell_bg(&c));
|
||||||
ncplane_set_bg_alpha(hud, CELL_ALPHA_BLEND);
|
ncplane_set_bg_alpha(hud, CELL_ALPHA_BLEND);
|
||||||
ncplane_set_fg(hud, 0x002080);
|
ncplane_set_fg(hud, 0x80d0ff);
|
||||||
ncplane_set_fg_alpha(hud, CELL_ALPHA_OPAQUE);
|
ncplane_set_fg_alpha(hud, CELL_ALPHA_OPAQUE);
|
||||||
cell_release(hud, &c);
|
cell_release(hud, &c);
|
||||||
if(ncplane_printf_yx(hud, 1, 1, "%d", elems->frames) < 0){
|
if(ncplane_printf_yx(hud, 1, 1, "%d", elems->frames) < 0){
|
||||||
|
Loading…
Reference in New Issue
Block a user