diff --git a/src/gui/luainstance.cpp b/src/gui/luainstance.cpp index 3d4a29788..26577d955 100644 --- a/src/gui/luainstance.cpp +++ b/src/gui/luainstance.cpp @@ -1896,6 +1896,12 @@ int CLuaInstance::CPictureNew(lua_State *L) lua_Integer color_background = (lua_Integer)COL_MENUCONTENT_PLUS_0; lua_Integer color_shadow = (lua_Integer)COL_MENUCONTENTDARK_PLUS_0; + /* + transparency = CFrameBuffer::TM_BLACK (2): Transparency when black content ('pseudo' transparency) + transparency = CFrameBuffer::TM_NONE (1): No 'pseudo' transparency + */ + lua_Integer transparency = CFrameBuffer::TM_NONE; + tableLookup(L, "parent" , (void**)&parent); tableLookup(L, "x" , x); tableLookup(L, "y" , y); @@ -1912,12 +1918,13 @@ int CLuaInstance::CPictureNew(lua_State *L) tableLookup(L, "color_frame" , color_frame); tableLookup(L, "color_background" , color_background); tableLookup(L, "color_shadow" , color_shadow); + tableLookup(L, "transparency" , transparency); CComponentsForm* pw = (parent && parent->w) ? parent->w->getBodyObject() : NULL; CLuaPicture **udata = (CLuaPicture **) lua_newuserdata(L, sizeof(CLuaPicture *)); *udata = new CLuaPicture(); - (*udata)->cp = new CComponentsPicture(x, y, dx, dy, image_name, pw, has_shadow, (fb_pixel_t)color_frame, (fb_pixel_t)color_background, (fb_pixel_t)color_shadow); + (*udata)->cp = new CComponentsPicture(x, y, dx, dy, image_name, pw, has_shadow, (fb_pixel_t)color_frame, (fb_pixel_t)color_background, (fb_pixel_t)color_shadow, transparency); (*udata)->parent = pw; luaL_getmetatable(L, "cpicture"); lua_setmetatable(L, -2);