mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
lua instances: adopt for last rebases with splitted lua source files
TODO: check/fix lua functionality, not tested yet
This commit is contained in:
@@ -148,7 +148,7 @@ int CLuaInstCCPicture::CCPictureHide(lua_State *L)
|
|||||||
lua_assert(lua_istable(L,1));
|
lua_assert(lua_istable(L,1));
|
||||||
CLuaCCPicture *D = CCPictureCheck(L, 1);
|
CLuaCCPicture *D = CCPictureCheck(L, 1);
|
||||||
if (!D) return 0;
|
if (!D) return 0;
|
||||||
|
#if 0
|
||||||
bool no_restore = false;
|
bool no_restore = false;
|
||||||
if (!tableLookup(L, "no_restore", no_restore)) {
|
if (!tableLookup(L, "no_restore", no_restore)) {
|
||||||
std::string tmp = "false";
|
std::string tmp = "false";
|
||||||
@@ -156,11 +156,12 @@ int CLuaInstCCPicture::CCPictureHide(lua_State *L)
|
|||||||
paramBoolDeprecated(L, tmp.c_str());
|
paramBoolDeprecated(L, tmp.c_str());
|
||||||
no_restore = (tmp == "true" || tmp == "1" || tmp == "yes");
|
no_restore = (tmp == "true" || tmp == "1" || tmp == "yes");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (D->parent) {
|
if (D->parent) {
|
||||||
D->cp->setPicture("");
|
D->cp->setPicture("");
|
||||||
D->cp->paint();
|
D->cp->paint();
|
||||||
} else
|
} else
|
||||||
D->cp->hide(no_restore);
|
D->cp->hide();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -98,12 +98,12 @@ int CLuaInstCCText::CCTextNew(lua_State *L)
|
|||||||
if (font_text >= SNeutrinoSettings::FONT_TYPE_COUNT || font_text < 0)
|
if (font_text >= SNeutrinoSettings::FONT_TYPE_COUNT || font_text < 0)
|
||||||
font_text = SNeutrinoSettings::FONT_TYPE_MENU;
|
font_text = SNeutrinoSettings::FONT_TYPE_MENU;
|
||||||
|
|
||||||
bool has_shadow = false;
|
int shadow_mode = CC_SHADOW_OFF;
|
||||||
if (!tableLookup(L, "has_shadow", has_shadow)) {
|
if (!tableLookup(L, "has_shadow", shadow_mode)) {
|
||||||
std::string tmp1 = "false";
|
std::string tmp1 = "false";
|
||||||
if (tableLookup(L, "has_shadow", tmp1))
|
if (tableLookup(L, "has_shadow", tmp1))
|
||||||
paramBoolDeprecated(L, tmp1.c_str());
|
paramBoolDeprecated(L, tmp1.c_str());
|
||||||
has_shadow = (tmp1 == "true" || tmp1 == "1" || tmp1 == "yes");
|
shadow_mode = (tmp1 == "true" || tmp1 == "1" || tmp1 == "yes");
|
||||||
}
|
}
|
||||||
|
|
||||||
tableLookup(L, "color_text", color_text);
|
tableLookup(L, "color_text", color_text);
|
||||||
@@ -142,7 +142,7 @@ int CLuaInstCCText::CCTextNew(lua_State *L)
|
|||||||
|
|
||||||
CLuaCCText **udata = (CLuaCCText **) lua_newuserdata(L, sizeof(CLuaCCText *));
|
CLuaCCText **udata = (CLuaCCText **) lua_newuserdata(L, sizeof(CLuaCCText *));
|
||||||
*udata = new CLuaCCText();
|
*udata = new CLuaCCText();
|
||||||
(*udata)->ct = new CComponentsText(x, y, dx, dy, text, mode, g_Font[font_text], pw, has_shadow, (fb_pixel_t)color_text, (fb_pixel_t)color_frame, (fb_pixel_t)color_body, (fb_pixel_t)color_shadow);
|
(*udata)->ct = new CComponentsText(x, y, dx, dy, text, mode, g_Font[font_text], 0 /*TODO: style not passed*/, pw, shadow_mode, (fb_pixel_t)color_text, (fb_pixel_t)color_frame, (fb_pixel_t)color_body, (fb_pixel_t)color_shadow);
|
||||||
(*udata)->parent = pw;
|
(*udata)->parent = pw;
|
||||||
(*udata)->mode = mode;
|
(*udata)->mode = mode;
|
||||||
(*udata)->font_text = font_text;
|
(*udata)->font_text = font_text;
|
||||||
@@ -173,7 +173,7 @@ int CLuaInstCCText::CCTextHide(lua_State *L)
|
|||||||
lua_assert(lua_istable(L,1));
|
lua_assert(lua_istable(L,1));
|
||||||
CLuaCCText *D = CCTextCheck(L, 1);
|
CLuaCCText *D = CCTextCheck(L, 1);
|
||||||
if (!D) return 0;
|
if (!D) return 0;
|
||||||
|
#if 0
|
||||||
bool no_restore = false;
|
bool no_restore = false;
|
||||||
if (!tableLookup(L, "no_restore", no_restore)) {
|
if (!tableLookup(L, "no_restore", no_restore)) {
|
||||||
std::string tmp = "false";
|
std::string tmp = "false";
|
||||||
@@ -181,11 +181,12 @@ int CLuaInstCCText::CCTextHide(lua_State *L)
|
|||||||
paramBoolDeprecated(L, tmp.c_str());
|
paramBoolDeprecated(L, tmp.c_str());
|
||||||
no_restore = (tmp == "true" || tmp == "1" || tmp == "yes");
|
no_restore = (tmp == "true" || tmp == "1" || tmp == "yes");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (D->parent) {
|
if (D->parent) {
|
||||||
D->ct->setText("", D->mode, g_Font[D->font_text]);
|
D->ct->setText("", D->mode, g_Font[D->font_text]);
|
||||||
D->ct->paint();
|
D->ct->paint();
|
||||||
} else
|
} else
|
||||||
D->ct->hide(no_restore);
|
D->ct->hide();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -196,7 +196,7 @@ int CLuaInstCCWindow::CCWindowHide(lua_State *L)
|
|||||||
lua_assert(lua_istable(L,1));
|
lua_assert(lua_istable(L,1));
|
||||||
CLuaCCWindow *D = CCWindowCheck(L, 1);
|
CLuaCCWindow *D = CCWindowCheck(L, 1);
|
||||||
if (!D) return 0;
|
if (!D) return 0;
|
||||||
|
#if 0
|
||||||
bool no_restore = false;
|
bool no_restore = false;
|
||||||
if (!tableLookup(L, "no_restore", no_restore)) {
|
if (!tableLookup(L, "no_restore", no_restore)) {
|
||||||
std::string tmp = "false";
|
std::string tmp = "false";
|
||||||
@@ -204,7 +204,8 @@ int CLuaInstCCWindow::CCWindowHide(lua_State *L)
|
|||||||
paramBoolDeprecated(L, tmp.c_str());
|
paramBoolDeprecated(L, tmp.c_str());
|
||||||
no_restore = (tmp == "true" || tmp == "1" || tmp == "yes");
|
no_restore = (tmp == "true" || tmp == "1" || tmp == "yes");
|
||||||
}
|
}
|
||||||
D->w->hide(no_restore);
|
#endif
|
||||||
|
D->w->hide();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user