mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 07:51:19 +02:00
lua: add function to set background image to window body
update to v1.87
This commit is contained in:
@@ -4,4 +4,4 @@
|
|||||||
* to luainstance.h changes
|
* to luainstance.h changes
|
||||||
*/
|
*/
|
||||||
#define LUA_API_VERSION_MAJOR 1
|
#define LUA_API_VERSION_MAJOR 1
|
||||||
#define LUA_API_VERSION_MINOR 86
|
#define LUA_API_VERSION_MINOR 87
|
||||||
|
@@ -57,6 +57,7 @@ void CLuaInstCCWindow::CCWindowRegister(lua_State *L)
|
|||||||
{ "footer_height", CLuaInstCCWindow::CCWindowGetFooterHeight_dep }, /* function 'footer_height' is deprecated */
|
{ "footer_height", CLuaInstCCWindow::CCWindowGetFooterHeight_dep }, /* function 'footer_height' is deprecated */
|
||||||
{ "setCenterPos", CLuaInstCCWindow::CCWindowSetCenterPos },
|
{ "setCenterPos", CLuaInstCCWindow::CCWindowSetCenterPos },
|
||||||
{ "setDimensionsAll", CLuaInstCCWindow::CCWindowSetDimensionsAll },
|
{ "setDimensionsAll", CLuaInstCCWindow::CCWindowSetDimensionsAll },
|
||||||
|
{ "setBodyImage", CCWindowSetBodyImage },
|
||||||
{ "__gc", CLuaInstCCWindow::CCWindowDelete },
|
{ "__gc", CLuaInstCCWindow::CCWindowDelete },
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
@@ -341,6 +342,20 @@ int CLuaInstCCWindow::CCWindowSetCenterPos(lua_State *L)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int CLuaInstCCWindow::CCWindowSetBodyImage(lua_State *L)
|
||||||
|
{
|
||||||
|
lua_assert(lua_istable(L,1));
|
||||||
|
CLuaCCWindow *D = CCWindowCheck(L, 1);
|
||||||
|
if (!D) return 0;
|
||||||
|
|
||||||
|
std::string image = "";
|
||||||
|
if (lua_istable(L, -1))
|
||||||
|
tableLookup(L, "image_path", image);
|
||||||
|
|
||||||
|
D->w->setBodyBGImage(image);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int CLuaInstCCWindow::CCWindowDelete(lua_State *L)
|
int CLuaInstCCWindow::CCWindowDelete(lua_State *L)
|
||||||
{
|
{
|
||||||
LUA_DEBUG("CLuaInstCCWindow::%s %d\n", __func__, lua_gettop(L));
|
LUA_DEBUG("CLuaInstCCWindow::%s %d\n", __func__, lua_gettop(L));
|
||||||
|
@@ -52,6 +52,7 @@ class CLuaInstCCWindow : CCHeaderTypes
|
|||||||
static int CCWindowSetCenterPos(lua_State *L);
|
static int CCWindowSetCenterPos(lua_State *L);
|
||||||
static int CCWindowDelete(lua_State *L);
|
static int CCWindowDelete(lua_State *L);
|
||||||
static int CCWindowSetDimensionsAll(lua_State *L);
|
static int CCWindowSetDimensionsAll(lua_State *L);
|
||||||
|
static int CCWindowSetBodyImage(lua_State *L);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //_LUACCWINDOW_H
|
#endif //_LUACCWINDOW_H
|
||||||
|
Reference in New Issue
Block a user