boxes

Tracer des diagrammes dans un terminal - retour accueil

git clone git://bebou.netlib.re/boxes

Log | Files | Refs | README |

commit 3e934a427b234b68302fa54aaccf4e1cfcdc23f7
parent ee684e4bec123db1c776b8142cefcedd70165ad2
Auteurice: Arthur Pons <arthur.pons@unistra.fr>
Date:   Fri, 13 Jun 2025 22:58:59 +0200

Déplacement message de debug

Diffstat:
Mboxes.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/boxes.c b/boxes.c @@ -21,7 +21,7 @@ void drawboxcoord(int x, int y, int w, int h) { tb_printf(x,y+i,TB_DEFAULT,TB_DEFAULT, "│"); tb_printf(x+w,y+i,TB_DEFAULT,TB_DEFAULT, "│"); } - tb_printf(tb_width()/2,0,TB_DEFAULT,TB_DEFAULT,"x: %d, y: %d\nw: %d, h: %d",x,y,w,h); + tb_printf(0,0,TB_DEFAULT,TB_DEFAULT,"x: %d, y: %d\nw: %d, h: %d",x,y,w,h); } void drawbox(struct box b) { drawboxcoord(b.x,b.y,b.w,b.h); } @@ -50,7 +50,7 @@ int main(int argc, char **argv) { while(1) { tb_clear(); for (int i=0;i<boxes.count;i++) drawbox(boxes.list[i]); - tb_printf(tb_width()/2,tb_height()-1,TB_DEFAULT,TB_DEFAULT,"count: %d",boxes.count); + tb_printf(0,tb_height()-1,TB_DEFAULT,TB_DEFAULT,"count: %d",boxes.count); tb_present(); tb_poll_event(&ev); switch(ev.key) {