mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
multiselector: work in ASCII environment #451
This commit is contained in:
parent
cd2cbd0d88
commit
f14444cfca
@ -495,7 +495,12 @@ ncmultiselector_draw(ncmultiselector* n){
|
|||||||
if(printidx == n->current){
|
if(printidx == n->current){
|
||||||
n->ncp->channels = (uint64_t)channels_bchannel(n->descchannels) << 32u | channels_fchannel(n->descchannels);
|
n->ncp->channels = (uint64_t)channels_bchannel(n->descchannels) << 32u | channels_fchannel(n->descchannels);
|
||||||
}
|
}
|
||||||
ncplane_putegc_yx(n->ncp, yoff, bodyoffset, n->items[printidx].selected ? "☒" : "☐", NULL);
|
// FIXME this is the wrong place to do this. see https://github.com/dankamongmen/notcurses/issues/451
|
||||||
|
if(enforce_utf8()){
|
||||||
|
ncplane_putegc_yx(n->ncp, yoff, bodyoffset, n->items[printidx].selected ? "☒" : "☐", NULL);
|
||||||
|
}else{
|
||||||
|
ncplane_putsimple_yx(n->ncp, yoff, bodyoffset, n->items[printidx].selected ? 'X' : '-');
|
||||||
|
}
|
||||||
n->ncp->channels = n->opchannels;
|
n->ncp->channels = n->opchannels;
|
||||||
if(printidx == n->current){
|
if(printidx == n->current){
|
||||||
n->ncp->channels = (uint64_t)channels_bchannel(n->opchannels) << 32u | channels_fchannel(n->opchannels);
|
n->ncp->channels = (uint64_t)channels_bchannel(n->opchannels) << 32u | channels_fchannel(n->opchannels);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user