Fixed a bug with drawing INVERS + CENTER

This commit is contained in:
jfrickmann
2022-01-31 21:33:20 +10:00
committed by Peter Feerick
parent b84ab08267
commit 65584ae0d6
+2
View File
@@ -233,6 +233,8 @@ static void drawString(lua_State *L, const char * s, LcdFlags flags)
int ix = x - INVERT_BOX_MARGIN;
if (flags & RIGHT)
ix -= width;
else if (flags & CENTERED)
ix -= width / 2;
width += 2 * INVERT_BOX_MARGIN;
luaLcdBuffer->drawSolidFilledRect(ix, y - INVERT_BOX_MARGIN, width, height, color);
} else {