aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2023-09-29 15:15:49 +0000
committerrodri <rgl@antares-labs.eu>2023-09-29 15:15:49 +0000
commitecee83f1b2184f8443d8fc4a32176dcbfa0bd7b0 (patch)
treeeea90655fd3ed9bf4eb0358b510bcfe2f7dd051d
parent2834b114cfe13279b5742649cc655506c53dde8c (diff)
downloadbattleship-ecee83f1b2184f8443d8fc4a32176dcbfa0bd7b0.tar.gz
battleship-ecee83f1b2184f8443d8fc4a32176dcbfa0bd7b0.tar.bz2
battleship-ecee83f1b2184f8443d8fc4a32176dcbfa0bd7b0.zip
paint the none entry in the middle of the row too.
-rw-r--r--menulist.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/menulist.c b/menulist.c
index 52b5362..9b439fa 100644
--- a/menulist.c
+++ b/menulist.c
@@ -132,8 +132,9 @@ menulist_draw(Menulist *ml, Image *dst)
er.max.y = er.min.y + font->height+Vspace;
}
if(i == 0){
+ width = stringwidth(font, none);
draw(dst, er, display->white, nil, ZP);
- string(dst, er.min, display->black, ZP, font, none);
+ string(dst, addpt(er.min, Pt(Dx(er)/2 - width/2,0)), display->black, ZP, font, none);
}
/* draw scroll */