feat(color): additions to LVGL for Lua scripts (#5179)

This commit is contained in:
philmoz
2024-07-01 09:07:18 +10:00
committed by GitHub
parent 15b0878a68
commit 4d29d5dbae
54 changed files with 653 additions and 404 deletions
+1 -2
View File
@@ -185,8 +185,7 @@ ZoneOption *createOptionsArray(int reference, uint8_t maxOptions)
// TRACE("default unsigned = %u", option->deflt.unsignedValue);
} else if (option->type == ZoneOption::Color) {
luaL_checktype(lsWidgets, -1, LUA_TNUMBER); // value is number
option->deflt.unsignedValue =
COLOR_VAL(flagsRGB(lua_tounsigned(lsWidgets, -1)));
option->deflt.unsignedValue = lua_tounsigned(lsWidgets, -1);
// TRACE("default unsigned = %u", option->deflt.unsignedValue);
} else if (option->type == ZoneOption::Bool) {
luaL_checktype(lsWidgets, -1, LUA_TNUMBER); // value is number