fix(color): VCENTER does not work for Lua drawText function (#5730)
This commit is contained in:
@@ -181,6 +181,10 @@ static void drawString(lua_State *L, const char * s, LcdFlags flags)
|
|||||||
int x = luaL_checkinteger(L, 1);
|
int x = luaL_checkinteger(L, 1);
|
||||||
int y = luaL_checkinteger(L, 2);
|
int y = luaL_checkinteger(L, 2);
|
||||||
|
|
||||||
|
// If VCENTER flag is on then Y position is assumed to be center line for text.
|
||||||
|
if (flags & VCENTERED)
|
||||||
|
y -= getFontHeight(flags) / 2;
|
||||||
|
|
||||||
bool invers = flags & INVERS;
|
bool invers = flags & INVERS;
|
||||||
if (flags & BLINK)
|
if (flags & BLINK)
|
||||||
invers = invers && !BLINK_ON_PHASE;
|
invers = invers && !BLINK_ON_PHASE;
|
||||||
|
|||||||
Reference in New Issue
Block a user