Fixed a bug with drawing INVERS + CENTER
This commit is contained in:
committed by
Peter Feerick
parent
b84ab08267
commit
65584ae0d6
@@ -233,6 +233,8 @@ static void drawString(lua_State *L, const char * s, LcdFlags flags)
|
|||||||
int ix = x - INVERT_BOX_MARGIN;
|
int ix = x - INVERT_BOX_MARGIN;
|
||||||
if (flags & RIGHT)
|
if (flags & RIGHT)
|
||||||
ix -= width;
|
ix -= width;
|
||||||
|
else if (flags & CENTERED)
|
||||||
|
ix -= width / 2;
|
||||||
width += 2 * INVERT_BOX_MARGIN;
|
width += 2 * INVERT_BOX_MARGIN;
|
||||||
luaLcdBuffer->drawSolidFilledRect(ix, y - INVERT_BOX_MARGIN, width, height, color);
|
luaLcdBuffer->drawSolidFilledRect(ix, y - INVERT_BOX_MARGIN, width, height, color);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user