mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
lua: implement kill() for cctext items
ct:kill()
This commit is contained in:
@@ -57,6 +57,7 @@ void CLuaInstCCText::CCTextRegister(lua_State *L)
|
|||||||
{ "new", CLuaInstCCText::CCTextNew },
|
{ "new", CLuaInstCCText::CCTextNew },
|
||||||
{ "paint", CLuaInstCCText::CCTextPaint },
|
{ "paint", CLuaInstCCText::CCTextPaint },
|
||||||
{ "hide", CLuaInstCCText::CCTextHide },
|
{ "hide", CLuaInstCCText::CCTextHide },
|
||||||
|
{ "kill", CLuaInstCCText::CCTextKill },
|
||||||
{ "setText", CLuaInstCCText::CCTextSetText },
|
{ "setText", CLuaInstCCText::CCTextSetText },
|
||||||
{ "getLines", CLuaInstCCText::CCTextGetLines },
|
{ "getLines", CLuaInstCCText::CCTextGetLines },
|
||||||
{ "scroll", CLuaInstCCText::CCTextScroll },
|
{ "scroll", CLuaInstCCText::CCTextScroll },
|
||||||
@@ -201,6 +202,23 @@ int CLuaInstCCText::CCTextHide(lua_State *L)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int CLuaInstCCText::CCTextKill(lua_State *L)
|
||||||
|
{
|
||||||
|
lua_assert(lua_istable(L,1));
|
||||||
|
CLuaCCText *D = CCTextCheck(L, 1);
|
||||||
|
if (!D) return 0;
|
||||||
|
|
||||||
|
lua_Unsigned color_bg = (lua_Unsigned)COL_BACKGROUND_PLUS_0;
|
||||||
|
lua_Integer corner_radius = -1;
|
||||||
|
if (lua_istable(L, -1)){
|
||||||
|
tableLookup(L, "color_bg", color_bg);
|
||||||
|
tableLookup(L, "corner_radius", corner_radius);
|
||||||
|
}
|
||||||
|
|
||||||
|
D->ct->kill(color_bg, corner_radius, ~CC_FBDATA_TYPES);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int CLuaInstCCText::CCTextSetText(lua_State *L)
|
int CLuaInstCCText::CCTextSetText(lua_State *L)
|
||||||
{
|
{
|
||||||
lua_assert(lua_istable(L,1));
|
lua_assert(lua_istable(L,1));
|
||||||
|
@@ -46,6 +46,7 @@ class CLuaInstCCText
|
|||||||
static int CCTextNew(lua_State *L);
|
static int CCTextNew(lua_State *L);
|
||||||
static int CCTextPaint(lua_State *L);
|
static int CCTextPaint(lua_State *L);
|
||||||
static int CCTextHide(lua_State *L);
|
static int CCTextHide(lua_State *L);
|
||||||
|
static int CCTextKill(lua_State *L);
|
||||||
static int CCTextSetText(lua_State *L);
|
static int CCTextSetText(lua_State *L);
|
||||||
static int CCTextGetLines(lua_State *L);
|
static int CCTextGetLines(lua_State *L);
|
||||||
static int CCTextScroll(lua_State *L);
|
static int CCTextScroll(lua_State *L);
|
||||||
|
Reference in New Issue
Block a user