mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
CLuaInstance: Add footer_height function
This commit is contained in:
@@ -1293,6 +1293,7 @@ void CLuaInstance::CWindowRegister(lua_State *L)
|
||||
{ "paint", CLuaInstance::CWindowPaint },
|
||||
{ "hide", CLuaInstance::CWindowHide },
|
||||
{ "header_height", CLuaInstance::CWindowGetHeaderHeight },
|
||||
{ "footer_height", CLuaInstance::CWindowGetFooterHeight },
|
||||
{ "__gc", CLuaInstance::CWindowDelete },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
@@ -1415,6 +1416,20 @@ int CLuaInstance::CWindowGetHeaderHeight(lua_State *L)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int CLuaInstance::CWindowGetFooterHeight(lua_State *L)
|
||||
{
|
||||
CLuaCWindow *m = CWindowCheck(L, 1);
|
||||
if (!m)
|
||||
return 0;
|
||||
|
||||
CComponentsFooter* footer = m->w->getFooterObject();
|
||||
int fh = 0;
|
||||
if (footer)
|
||||
fh = footer->getHeight();
|
||||
lua_pushinteger(L, fh);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int CLuaInstance::CWindowDelete(lua_State *L)
|
||||
{
|
||||
CLuaCWindow *m = CWindowCheck(L, 1);
|
||||
|
Reference in New Issue
Block a user