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:
Michael Liebmann
2014-09-17 20:46:43 +02:00
parent 582b110eb4
commit 79edd0f657
2 changed files with 25 additions and 0 deletions

View File

@@ -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);