[demo] place hud down and in center

pull/1621/head
nick black 3 years ago
parent 745cbfb41b
commit c792b2e972
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -412,16 +412,15 @@ struct ncplane* hud_create(struct notcurses* nc){
int dimx, dimy;
notcurses_term_dim_yx(nc, &dimy, &dimx);
struct ncplane_options nopts = {
.y = 2,
// we want it to start tucked right up underneath the title of the FPS
// graph. graph is min(FPSGRAPH_MAX_COLS, dimx) wide, centered, and we want 6 in.
.x = dimx - 2 - HUD_COLS,
// FPS graph is 6 rows tall; we want one row above it
.y = dimy - 6 - HUD_ROWS - 1,
.x = NCALIGN_CENTER,
.rows = HUD_ROWS,
.cols = HUD_COLS,
.userptr = NULL,
.name = "hud",
.resizecb = NULL,
.flags = 0,
.flags = NCPLANE_OPTION_HORALIGNED,
};
struct ncplane* n = ncplane_create(notcurses_stdplane(nc), &nopts);
if(n == NULL){

Loading…
Cancel
Save