adjust ncplane_yx() for margins

pull/405/head
nick black 4 years ago
parent c056a0a026
commit d5d827f38e
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -99,6 +99,7 @@ int intro(struct notcurses* nc){
return -1;
}
ncplane_styles_off(ncp, NCSTYLE_ITALIC);
// FIXME don't blow away the background color from the gradient. make this a transplane
ncplane_set_fg_rgb(ncp, 0xff, 0xff, 0xff);
if(ncplane_printf_aligned(ncp, rows - 5, NCALIGN_CENTER, "notcurses %s. press 'q' to quit.", notcurses_version()) < 0){
return -1;

@ -1814,17 +1814,17 @@ int ncplane_move_yx(ncplane* n, int y, int x){
if(n == n->nc->stdscr){
return -1;
}
n->absy = y;
n->absx = x;
n->absy = y + n->nc->stdscr->absy;
n->absx = x + n->nc->stdscr->absx;
return 0;
}
void ncplane_yx(const ncplane* n, int* y, int* x){
if(y){
*y = n->absy;
*y = n->absy - n->nc->stdscr->absy;
}
if(x){
*x = n->absx;
*x = n->absx - n->nc->stdscr->absx;
}
}

Loading…
Cancel
Save