mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-18 03:25:55 +00:00
change demo order
This commit is contained in:
parent
ea10d80eec
commit
065d44001c
@ -20,7 +20,7 @@ on your terminal after the program exits.
|
||||
Print a usage message, and exit with success.
|
||||
.TP
|
||||
.IR demospec
|
||||
Select which demos to run, and what order to run them in. The default is "isumbgwvpo". See below for a list of demos.
|
||||
Select which demos to run, and what order to run them in. The default is "imbgsuwvpo". See below for a list of demos.
|
||||
.SH DESCRIPTION
|
||||
.B notcurses-demo
|
||||
contains a set of text-based demonstrations of capabilities from the notcurses library. The demonstrations include:
|
||||
|
@ -9,6 +9,8 @@
|
||||
#include <notcurses.h>
|
||||
#include "demo.h"
|
||||
|
||||
static const char DEFAULT_DEMO[] = "imbgsuwvpo";
|
||||
|
||||
int timespec_subtract(struct timespec *result, const struct timespec *time0,
|
||||
struct timespec *time1){
|
||||
if(time0->tv_nsec < time1->tv_nsec){
|
||||
@ -324,7 +326,7 @@ int main(int argc, char** argv){
|
||||
if(argv[optind] != NULL){
|
||||
usage(*argv, EXIT_FAILURE);
|
||||
}
|
||||
demos = "isumbgwvpo";
|
||||
demos = DEFAULT_DEMO;
|
||||
}
|
||||
if((nc = notcurses_init(&nopts)) == NULL){
|
||||
return EXIT_FAILURE;
|
||||
|
@ -172,6 +172,7 @@ int unicodeblocks_demo(struct notcurses* nc){
|
||||
cell_release(n, &c);
|
||||
}
|
||||
ncplane_set_fg_rgb(n, 0x40, 0xc0, 0x40);
|
||||
ncplane_set_bg_rgb(n, 0, 0, 0);
|
||||
if(ncplane_cursor_move_yx(n, 6 + BLOCKSIZE / CHUNKSIZE, 0)){
|
||||
return -1;
|
||||
}
|
||||
|
@ -578,6 +578,7 @@ int widecolor_demo(struct notcurses* nc){
|
||||
struct ncplane* n = notcurses_stdplane(nc);
|
||||
size_t i;
|
||||
const size_t screens = sizeof(steps) / sizeof(*steps);
|
||||
ncplane_erase(n);
|
||||
for(i = 0 ; i < screens ; ++i){
|
||||
ncspecial_key special;
|
||||
cell c;
|
||||
@ -587,7 +588,6 @@ int widecolor_demo(struct notcurses* nc){
|
||||
const int rollover = 256 / ((step & 0xff) | ((step & 0xff00) >> 8u)
|
||||
| ((step & 0xff0000) >> 16u));
|
||||
int rollcount = 0; // number of times we've added this step
|
||||
//ncplane_erase(n);
|
||||
int dimy, dimx;
|
||||
notcurses_resize(nc, &dimy, &dimx);
|
||||
cell_init(&c);
|
||||
|
Loading…
Reference in New Issue
Block a user