Un jeu de cartes à piper les une dans les autres - retour accueil
git clone git://bebou.netlib.re/pipe-game
Log | Files | Refs | README |
commit 8936b2e100d3f01d4be3d53716ca6bc87fcf6483 parent af75295caebefb7f6dfd573ae68b603167aaacc5 Auteurice: Arthur Pons <arthur.pons@unistra.fr> Date: Thu, 30 Jan 2025 21:54:06 +0100 Pas de titre à la boite c'est NULL au lieu de "" Ca évite de faire un strlen (remarque si ça se trouve "" c'est NULL ??) Diffstat:
M | interface.c | | | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/interface.c b/interface.c @@ -190,7 +190,7 @@ coord displaybox(char* name, int coloffset, int lineoffset, int width, int lengt hr(coloffset+1,lineoffset+length,width-1,selected); vr(coloffset,lineoffset+1,length-1,selected); vr(coloffset+width,lineoffset+1,length-1,selected); - tb_print(coloffset+2,lineoffset,color,TB_DEFAULT,name); + if(name) tb_printf(coloffset+2,lineoffset,color,TB_DEFAULT," %s ",name); tb_print(coloffset,lineoffset,color,TB_DEFAULT,"╭"); tb_print(coloffset+width,lineoffset,color,TB_DEFAULT,"╮"); tb_print(coloffset,lineoffset+length,color,TB_DEFAULT,"╰"); @@ -223,7 +223,7 @@ coord displaypile(struct pile *p, struct pile *curmenu, int coloffset, int lineo coord displaytextblock(char *text, int coloffset, int lineoffset) { coord p; int nbl=nblines(text), w=30; p.y=nbl+lineoffset; p.x=w+coloffset; - displaybox("",coloffset,lineoffset,w,nbl,false); + displaybox(NULL,coloffset,lineoffset,w,nbl,false); coloffset++; lineoffset++; tb_printf(coloffset, lineoffset, TB_DEFAULT, TB_DEFAULT, text); return p;