mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-18 03:25:55 +00:00
griddemo: use double-thick box draws for middle grid
This commit is contained in:
parent
8f840d8f91
commit
fb07becc16
@ -17,6 +17,33 @@ release_cells(struct ncplane* n,
|
|||||||
cell_release(n, lr);
|
cell_release(n, lr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
prep_cells2(struct ncplane* n,
|
||||||
|
cell* ul, cell* uc, cell* ur,
|
||||||
|
cell* cl, cell* cc, cell* cr,
|
||||||
|
cell* ll, cell* lc, cell* lr){
|
||||||
|
cell_init(ul);
|
||||||
|
cell_init(uc);
|
||||||
|
cell_init(cl);
|
||||||
|
cell_init(cr);
|
||||||
|
cell_init(ll);
|
||||||
|
cell_init(lc);
|
||||||
|
cell_init(lr);
|
||||||
|
cell_init(ur);
|
||||||
|
cell_init(cc);
|
||||||
|
int ret = 0;
|
||||||
|
ret |= cell_load(n, ul, "╔");
|
||||||
|
ret |= cell_load(n, uc, "╦");
|
||||||
|
ret |= cell_load(n, ur, "╗");
|
||||||
|
ret |= cell_load(n, cl, "╠");
|
||||||
|
ret |= cell_load(n, cc, "╬");
|
||||||
|
ret |= cell_load(n, cr, "╣");
|
||||||
|
ret |= cell_load(n, ll, "╚");
|
||||||
|
ret |= cell_load(n, lc, "╩");
|
||||||
|
ret |= cell_load(n, lr, "╝");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
prep_cells(struct ncplane* n,
|
prep_cells(struct ncplane* n,
|
||||||
cell* ul, cell* uc, cell* ur,
|
cell* ul, cell* uc, cell* ur,
|
||||||
@ -120,7 +147,7 @@ gridinv_demo(struct notcurses* nc, struct ncplane *n){
|
|||||||
int x = 0;
|
int x = 0;
|
||||||
int y = 0;
|
int y = 0;
|
||||||
cell ul, ll, cl, cr, lc, lr, ur, uc, cc;
|
cell ul, ll, cl, cr, lc, lr, ur, uc, cc;
|
||||||
prep_cells(n, &ul, &uc, &ur, &cl, &cc, &cr, &ll, &lc, &lr);
|
prep_cells2(n, &ul, &uc, &ur, &cl, &cc, &cr, &ll, &lc, &lr);
|
||||||
if(ncplane_cursor_move_yx(n, y, x)){
|
if(ncplane_cursor_move_yx(n, y, x)){
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user