mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-06 03:20:26 +00:00
zoo: create selector
This commit is contained in:
parent
f62277a69b
commit
988bb1f2a6
@ -1,8 +1,20 @@
|
||||
#include "demo.h"
|
||||
|
||||
int zoo_demo(struct notcurses* nc){
|
||||
struct ncplane* n = notcurses_stdplane(nc);
|
||||
ncselector_options sopts = {
|
||||
.maxdisplay = 4,
|
||||
.title = "single-item selector",
|
||||
};
|
||||
struct ncselector* selector = ncselector_create(n, 1, 1, &sopts);
|
||||
if(selector == NULL){
|
||||
return -1;
|
||||
}
|
||||
DEMO_RENDER(nc);
|
||||
// FIXME swoop a selector in from the right
|
||||
demo_nanosleep(nc, &demodelay);
|
||||
ncselector_destroy(selector, NULL);
|
||||
// FIXME swoop a multiselector in from the left
|
||||
(void)nc; // FIXME
|
||||
DEMO_RENDER(nc);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user