mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 01:11:12 +02:00
luainstance/cwindow: Add funktion setWindowColor
This commit is contained in:
@@ -1634,6 +1634,7 @@ void CLuaInstance::CWindowRegister(lua_State *L)
|
|||||||
{ "paint", CLuaInstance::CWindowPaint },
|
{ "paint", CLuaInstance::CWindowPaint },
|
||||||
{ "hide", CLuaInstance::CWindowHide },
|
{ "hide", CLuaInstance::CWindowHide },
|
||||||
{ "setCaption", CLuaInstance::CWindowSetCaption },
|
{ "setCaption", CLuaInstance::CWindowSetCaption },
|
||||||
|
{ "setWindowColor", CLuaInstance::CWindowSetWindowColor },
|
||||||
{ "paintHeader", CLuaInstance::CWindowPaintHeader },
|
{ "paintHeader", CLuaInstance::CWindowPaintHeader },
|
||||||
{ "headerHeight", CLuaInstance::CWindowGetHeaderHeight },
|
{ "headerHeight", CLuaInstance::CWindowGetHeaderHeight },
|
||||||
{ "footerHeight", CLuaInstance::CWindowGetFooterHeight },
|
{ "footerHeight", CLuaInstance::CWindowGetFooterHeight },
|
||||||
@@ -1801,6 +1802,29 @@ int CLuaInstance::CWindowSetCaption(lua_State *L)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int CLuaInstance::CWindowSetWindowColor(lua_State *L)
|
||||||
|
{
|
||||||
|
lua_assert(lua_istable(L,1));
|
||||||
|
CLuaCWindow *m = CWindowCheck(L, 1);
|
||||||
|
if (!m) return 0;
|
||||||
|
|
||||||
|
lua_Unsigned color;
|
||||||
|
if (tableLookup(L, "color_frame" , color)) {
|
||||||
|
checkMagicMask(color);
|
||||||
|
m->w->setColorFrame(color);
|
||||||
|
}
|
||||||
|
if (tableLookup(L, "color_body" , color)) {
|
||||||
|
checkMagicMask(color);
|
||||||
|
m->w->setColorBody(color);
|
||||||
|
}
|
||||||
|
if (tableLookup(L, "color_shadow" , color)) {
|
||||||
|
checkMagicMask(color);
|
||||||
|
m->w->setColorShadow(color);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int CLuaInstance::CWindowPaintHeader(lua_State *L)
|
int CLuaInstance::CWindowPaintHeader(lua_State *L)
|
||||||
{
|
{
|
||||||
CLuaCWindow *m = CWindowCheck(L, 1);
|
CLuaCWindow *m = CWindowCheck(L, 1);
|
||||||
|
@@ -239,6 +239,7 @@ private:
|
|||||||
static int CWindowPaint(lua_State *L);
|
static int CWindowPaint(lua_State *L);
|
||||||
static int CWindowHide(lua_State *L);
|
static int CWindowHide(lua_State *L);
|
||||||
static int CWindowSetCaption(lua_State *L);
|
static int CWindowSetCaption(lua_State *L);
|
||||||
|
static int CWindowSetWindowColor(lua_State *L);
|
||||||
static int CWindowPaintHeader(lua_State *L);
|
static int CWindowPaintHeader(lua_State *L);
|
||||||
static int CWindowGetHeaderHeight(lua_State *L);
|
static int CWindowGetHeaderHeight(lua_State *L);
|
||||||
static int CWindowGetFooterHeight(lua_State *L);
|
static int CWindowGetFooterHeight(lua_State *L);
|
||||||
|
Reference in New Issue
Block a user