|
|
|
@ -57,6 +57,32 @@ hud_grabbed_bg(struct ncplane* n){
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
struct ncmenu* menu_create(struct notcurses* nc){
|
|
|
|
|
struct ncmenu_item demo_items[] = {
|
|
|
|
|
{ .desc = "Restart", .shortcut = { .id = 'r', .ctrl = true, }, },
|
|
|
|
|
};
|
|
|
|
|
const struct ncmenu_section sections[] = {
|
|
|
|
|
{ .name = "notcurses-demo", .items = demo_items,
|
|
|
|
|
.itemcount = sizeof(demo_items) / sizeof(*demo_items),
|
|
|
|
|
.shortcut = { .id = 'o', .alt = true, }, },
|
|
|
|
|
};
|
|
|
|
|
uint64_t headerchannels = 0;
|
|
|
|
|
uint64_t sectionchannels = 0;
|
|
|
|
|
channels_set_fg(&headerchannels, 0x00ff00);
|
|
|
|
|
channels_set_bg(&headerchannels, 0x440000);
|
|
|
|
|
channels_set_fg_alpha(§ionchannels, CELL_ALPHA_TRANSPARENT);
|
|
|
|
|
channels_set_bg_alpha(§ionchannels, CELL_ALPHA_TRANSPARENT);
|
|
|
|
|
const ncmenu_options mopts = {
|
|
|
|
|
.bottom = false,
|
|
|
|
|
.hiding = false,
|
|
|
|
|
.sections = sections,
|
|
|
|
|
.sectioncount = sizeof(sections) / sizeof(*sections),
|
|
|
|
|
.headerchannels = headerchannels,
|
|
|
|
|
.sectionchannels = sectionchannels,
|
|
|
|
|
};
|
|
|
|
|
return ncmenu_create(nc, &mopts);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
struct ncplane* hud_create(struct notcurses* nc){
|
|
|
|
|
int dimx, dimy;
|
|
|
|
|
notcurses_term_dim_yx(nc, &dimy, &dimx);
|
|
|
|
|