Selector: inverse rather than reverse video #302

pull/312/head
nick black 5 years ago
parent fe51f93a4c
commit 05a83e54c7
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -66,17 +66,17 @@ ncselector_draw(ncselector* n){
if(n->maxdisplay && printed == n->maxdisplay){
break;
}
n->ncp->channels = n->opchannels;
if(printidx == n->selected){
ncplane_styles_on(n->ncp, CELL_STYLE_REVERSE);
n->ncp->channels = (uint64_t)channels_bchannel(n->opchannels) << 32u | channels_fchannel(n->opchannels);
}
n->ncp->channels = n->opchannels;
ncplane_printf_yx(n->ncp, yoff, bodyoffset, "%*.*s", (int)n->longop,
(int)n->longop, n->items[printidx].option);
n->ncp->channels = n->descchannels;
ncplane_printf_yx(n->ncp, yoff, bodyoffset + n->longop, " %s", n->items[printidx].desc);
if(printidx == n->selected){
ncplane_styles_off(n->ncp, CELL_STYLE_REVERSE);
n->ncp->channels = (uint64_t)channels_bchannel(n->descchannels) << 32u | channels_fchannel(n->descchannels);
}
ncplane_printf_yx(n->ncp, yoff, bodyoffset + n->longop, " %s", n->items[printidx].desc);
if(++printidx == n->itemcount){
printidx = 0;
}

Loading…
Cancel
Save