mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
CLuaInstance: Fix commit e85f64d733
- Use return value from checkMagicMask() for color
This commit is contained in:
@@ -108,9 +108,9 @@ int CLuaInstCCPicture::CCPictureNew(lua_State *L)
|
|||||||
tableLookup(L, "color_shadow", color_shadow);
|
tableLookup(L, "color_shadow", color_shadow);
|
||||||
tableLookup(L, "transparency", transparency);
|
tableLookup(L, "transparency", transparency);
|
||||||
|
|
||||||
checkMagicMask(color_frame);
|
color_frame = checkMagicMask(color_frame);
|
||||||
checkMagicMask(color_background);
|
color_background = checkMagicMask(color_background);
|
||||||
checkMagicMask(color_shadow);
|
color_shadow = checkMagicMask(color_shadow);
|
||||||
|
|
||||||
CComponentsForm* pw = (parent && parent->w) ? parent->w->getBodyObject() : NULL;
|
CComponentsForm* pw = (parent && parent->w) ? parent->w->getBodyObject() : NULL;
|
||||||
|
|
||||||
|
@@ -111,10 +111,10 @@ int CLuaInstCCText::CCTextNew(lua_State *L)
|
|||||||
tableLookup(L, "color_body", color_body);
|
tableLookup(L, "color_body", color_body);
|
||||||
tableLookup(L, "color_shadow", color_shadow);
|
tableLookup(L, "color_shadow", color_shadow);
|
||||||
|
|
||||||
checkMagicMask(color_text);
|
color_text = checkMagicMask(color_text);
|
||||||
checkMagicMask(color_frame);
|
color_frame = checkMagicMask(color_frame);
|
||||||
checkMagicMask(color_body);
|
color_body = checkMagicMask(color_body);
|
||||||
checkMagicMask(color_shadow);
|
color_shadow = checkMagicMask(color_shadow);
|
||||||
|
|
||||||
if (!tmpMode.empty()) {
|
if (!tmpMode.empty()) {
|
||||||
table_key txt_align[] = {
|
table_key txt_align[] = {
|
||||||
|
@@ -104,9 +104,9 @@ int CLuaInstCCWindow::CCWindowNew(lua_State *L)
|
|||||||
tableLookup(L, "btnYellow", btnYellow);
|
tableLookup(L, "btnYellow", btnYellow);
|
||||||
tableLookup(L, "btnBlue", btnBlue);
|
tableLookup(L, "btnBlue", btnBlue);
|
||||||
|
|
||||||
checkMagicMask(color_frame);
|
color_frame = checkMagicMask(color_frame);
|
||||||
checkMagicMask(color_body);
|
color_body = checkMagicMask(color_body);
|
||||||
checkMagicMask(color_shadow);
|
color_shadow = checkMagicMask(color_shadow);
|
||||||
|
|
||||||
bool show_header = true;
|
bool show_header = true;
|
||||||
if (!tableLookup(L, "show_header", show_header)) {
|
if (!tableLookup(L, "show_header", show_header)) {
|
||||||
@@ -227,15 +227,15 @@ int CLuaInstCCWindow::CCWindowSetWindowColor(lua_State *L)
|
|||||||
|
|
||||||
lua_Unsigned color;
|
lua_Unsigned color;
|
||||||
if (tableLookup(L, "color_frame" , color)) {
|
if (tableLookup(L, "color_frame" , color)) {
|
||||||
checkMagicMask(color);
|
color = checkMagicMask(color);
|
||||||
D->w->setColorFrame(color);
|
D->w->setColorFrame(color);
|
||||||
}
|
}
|
||||||
if (tableLookup(L, "color_body" , color)) {
|
if (tableLookup(L, "color_body" , color)) {
|
||||||
checkMagicMask(color);
|
color = checkMagicMask(color);
|
||||||
D->w->setColorBody(color);
|
D->w->setColorBody(color);
|
||||||
}
|
}
|
||||||
if (tableLookup(L, "color_shadow" , color)) {
|
if (tableLookup(L, "color_shadow" , color)) {
|
||||||
checkMagicMask(color);
|
color = checkMagicMask(color);
|
||||||
D->w->setColorShadow(color);
|
D->w->setColorShadow(color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -768,7 +768,7 @@ int CLuaInstance::PaintBox(lua_State *L)
|
|||||||
w = W->fbwin->dx - x;
|
w = W->fbwin->dx - x;
|
||||||
if (h < 0 || y + h > W->fbwin->dy)
|
if (h < 0 || y + h > W->fbwin->dy)
|
||||||
h = W->fbwin->dy - y;
|
h = W->fbwin->dy - y;
|
||||||
checkMagicMask(c);
|
c = checkMagicMask(c);
|
||||||
W->fbwin->paintBoxRel(x, y, w, h, c, radius, corner);
|
W->fbwin->paintBoxRel(x, y, w, h, c, radius, corner);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -791,7 +791,7 @@ int CLuaInstance::paintHLineRel(lua_State *L)
|
|||||||
y = 0;
|
y = 0;
|
||||||
if (dx < 0 || x + dx > W->fbwin->dx)
|
if (dx < 0 || x + dx > W->fbwin->dx)
|
||||||
dx = W->fbwin->dx - x;
|
dx = W->fbwin->dx - x;
|
||||||
checkMagicMask(c);
|
c = checkMagicMask(c);
|
||||||
W->fbwin->paintHLineRel(x, dx, y, c);
|
W->fbwin->paintHLineRel(x, dx, y, c);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -814,7 +814,7 @@ int CLuaInstance::paintVLineRel(lua_State *L)
|
|||||||
y = 0;
|
y = 0;
|
||||||
if (dy < 0 || y + dy > W->fbwin->dy)
|
if (dy < 0 || y + dy > W->fbwin->dy)
|
||||||
dy = W->fbwin->dy - y;
|
dy = W->fbwin->dy - y;
|
||||||
checkMagicMask(c);
|
c = checkMagicMask(c);
|
||||||
W->fbwin->paintVLineRel(x, y, dy, c);
|
W->fbwin->paintVLineRel(x, y, dy, c);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -885,7 +885,7 @@ int CLuaInstance::RenderString(lua_State *L)
|
|||||||
if (rwidth < w)
|
if (rwidth < w)
|
||||||
x += (w - rwidth) / 2;
|
x += (w - rwidth) / 2;
|
||||||
}
|
}
|
||||||
checkMagicMask(c);
|
c = checkMagicMask(c);
|
||||||
if (boxh > -1) /* if boxh < 0, don't paint string */
|
if (boxh > -1) /* if boxh < 0, don't paint string */
|
||||||
W->fbwin->RenderString(font, x, y, w, text, c, boxh);
|
W->fbwin->RenderString(font, x, y, w, text, c, boxh);
|
||||||
lua_pushinteger(L, rwidth); /* return renderwidth */
|
lua_pushinteger(L, rwidth); /* return renderwidth */
|
||||||
|
Reference in New Issue
Block a user