CLuaInstance: Display warning when using a obsolete parameter...

...in cwindow/ctext/cpicture:hide()
This commit is contained in:
M. Liebmann
2015-12-28 15:24:35 +01:00
parent 92b579b3c6
commit 75631a97f1
3 changed files with 18 additions and 27 deletions

View File

@@ -148,15 +148,12 @@ int CLuaInstCCPicture::CCPictureHide(lua_State *L)
lua_assert(lua_istable(L,1));
CLuaCCPicture *D = CCPictureCheck(L, 1);
if (!D) return 0;
#if 0
bool no_restore = false;
if (!tableLookup(L, "no_restore", no_restore)) {
std::string tmp = "false";
if (tableLookup(L, "no_restore", tmp))
paramBoolDeprecated(L, tmp.c_str());
no_restore = (tmp == "true" || tmp == "1" || tmp == "yes");
}
#endif
bool tmp1 = false;
std::string tmp2 = "false";
if ((tableLookup(L, "no_restore", tmp1)) || (tableLookup(L, "no_restore", tmp2)))
printf("[%s:hide] Warning, obsolete parameter in use, please remove!\n", "cpicture");
if (D->parent) {
D->cp->setPicture("");
D->cp->paint();

View File

@@ -173,15 +173,12 @@ int CLuaInstCCText::CCTextHide(lua_State *L)
lua_assert(lua_istable(L,1));
CLuaCCText *D = CCTextCheck(L, 1);
if (!D) return 0;
#if 0
bool no_restore = false;
if (!tableLookup(L, "no_restore", no_restore)) {
std::string tmp = "false";
if (tableLookup(L, "no_restore", tmp))
paramBoolDeprecated(L, tmp.c_str());
no_restore = (tmp == "true" || tmp == "1" || tmp == "yes");
}
#endif
bool tmp1 = false;
std::string tmp2 = "false";
if ((tableLookup(L, "no_restore", tmp1)) || (tableLookup(L, "no_restore", tmp2)))
printf("[%s:hide] Warning, obsolete parameter in use, please remove!\n", "ctext");
if (D->parent) {
D->ct->setText("", D->mode, g_Font[D->font_text]);
D->ct->paint();

View File

@@ -196,15 +196,12 @@ int CLuaInstCCWindow::CCWindowHide(lua_State *L)
lua_assert(lua_istable(L,1));
CLuaCCWindow *D = CCWindowCheck(L, 1);
if (!D) return 0;
#if 0
bool no_restore = false;
if (!tableLookup(L, "no_restore", no_restore)) {
std::string tmp = "false";
if (tableLookup(L, "no_restore", tmp))
paramBoolDeprecated(L, tmp.c_str());
no_restore = (tmp == "true" || tmp == "1" || tmp == "yes");
}
#endif
bool tmp1 = false;
std::string tmp2 = "false";
if ((tableLookup(L, "no_restore", tmp1)) || (tableLookup(L, "no_restore", tmp2)))
printf("[%s:hide] Warning, obsolete parameter in use, please remove!\n", "cwindow");
D->w->hide();
return 0;
}