mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 17:01:08 +02:00
luainstance/cwindow: Add funktion setWindowColor
Origin commit data
------------------
Branch: ni/coolstream
Commit: 57ffa12e6b
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2014-09-17 (Wed, 17 Sep 2014)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1634,6 +1634,7 @@ void CLuaInstance::CWindowRegister(lua_State *L)
|
||||
{ "paint", CLuaInstance::CWindowPaint },
|
||||
{ "hide", CLuaInstance::CWindowHide },
|
||||
{ "setCaption", CLuaInstance::CWindowSetCaption },
|
||||
{ "setWindowColor", CLuaInstance::CWindowSetWindowColor },
|
||||
{ "paintHeader", CLuaInstance::CWindowPaintHeader },
|
||||
{ "headerHeight", CLuaInstance::CWindowGetHeaderHeight },
|
||||
{ "footerHeight", CLuaInstance::CWindowGetFooterHeight },
|
||||
@@ -1801,6 +1802,29 @@ int CLuaInstance::CWindowSetCaption(lua_State *L)
|
||||
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)
|
||||
{
|
||||
CLuaCWindow *m = CWindowCheck(L, 1);
|
||||
|
Reference in New Issue
Block a user