mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-18 03:25:55 +00:00
ncreel: fix up rendering, reel display #618
This commit is contained in:
parent
8ff3402166
commit
30412d54ce
@ -116,17 +116,19 @@ int main(int argc, char** argv){
|
||||
if(!n){
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if(!nstd->set_fg(0xb11bb1)){
|
||||
if(!n->set_fg_rgb(0xb1, 0x1b, 0xb1)){
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if(nstd->putstr(0, NCAlign::Center, "(a)dd (d)el (q)uit") <= 0){
|
||||
if(n->putstr(0, NCAlign::Center, "(a)dd (d)el (q)uit") <= 0){
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
channels_set_fg(&NcReel::default_options.focusedchan, 0xffffff);
|
||||
channels_set_bg(&NcReel::default_options.focusedchan, 0x00c080);
|
||||
channels_set_fg(&NcReel::default_options.borderchan, 0x00c080);
|
||||
std::shared_ptr<NcReel> nr(n->ncreel_create());
|
||||
if(!nr || nc.render()){
|
||||
ncreel_options nopts{};
|
||||
channels_set_fg(&nopts.focusedchan, 0xffffff);
|
||||
channels_set_bg(&nopts.focusedchan, 0x00c080);
|
||||
channels_set_fg(&nopts.borderchan, 0x00c080);
|
||||
nopts.toff = 3;
|
||||
std::shared_ptr<NcReel> nr(n->ncreel_create(&nopts));
|
||||
if(!nr || !nc.render()){
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
char32_t key;
|
||||
@ -151,7 +153,7 @@ int main(int argc, char** argv){
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if(nc.render()){
|
||||
if(!nc.render()){
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user