shithub: battleship

Download patch

ref: ecee83f1b2184f8443d8fc4a32176dcbfa0bd7b0
parent: 2834b114cfe13279b5742649cc655506c53dde8c
author: rodri <[email protected]>
date: Fri Sep 29 11:15:49 EDT 2023

paint the none entry in the middle of the row too.

--- a/menulist.c
+++ b/menulist.c
@@ -132,8 +132,9 @@
 		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 */