Closed XuNeo closed 4 months ago
Check if the first parameter is table, if so, the parent must be nil and default root is used. This allows us to create object on screen easier.
The change is pretty simple.
@@ -842,7 +842,7 @@ LUALIB_API int luavgl_obj_create_helper(lua_State *L, luavgl_ctx_t *ctx = luavgl_context(L); lv_obj_t *parent; - if (lua_isnoneornil(L, 1)) { + if (lua_type(L, 1) == LUA_TTABLE || lua_isnoneornil(L, 1)) { parent = ctx->root; } else { parent = luavgl_to_obj(L, 1);
Check if the first parameter is table, if so, the parent must be nil and default root is used. This allows us to create object on screen easier.
The change is pretty simple.