Merge remote-tracking branch 'check/next-cc-fixed'

This commit is contained in:
Stefan Seyfried
2014-01-26 00:33:08 +01:00
26 changed files with 444 additions and 309 deletions

View File

@@ -1333,28 +1333,30 @@ CLuaCWindow *CLuaInstance::CWindowCheck(lua_State *L, int n)
int CLuaInstance::CWindowPaint(lua_State *L)
{
lua_assert(lua_istable(L,1));
int do_save_bg = 1;
tableLookup(L, "do_save_bg", do_save_bg);
std::string tmp = "true";
tableLookup(L, "do_save_bg", tmp);
bool do_save_bg = (tmp == "true" || tmp == "1" || tmp == "yes");
CLuaCWindow *m = CWindowCheck(L, 1);
if (!m)
return 0;
m->w->paint((do_save_bg!=0)?true:false);
m->w->paint(do_save_bg);
return 0;
}
int CLuaInstance::CWindowHide(lua_State *L)
{
lua_assert(lua_istable(L,1));
int no_restore = 0;
tableLookup(L, "no_restore", no_restore);
std::string tmp = "false";
tableLookup(L, "no_restore", tmp);
bool no_restore = (tmp == "true" || tmp == "1" || tmp == "yes");
CLuaCWindow *m = CWindowCheck(L, 1);
if (!m)
return 0;
m->w->hide((no_restore!=0)?true:false);
m->w->hide(no_restore);
return 0;
}
@@ -1416,14 +1418,15 @@ int CLuaInstance::SignalBoxNew(lua_State *L)
int CLuaInstance::SignalBoxPaint(lua_State *L)
{
lua_assert(lua_istable(L,1));
int do_save_bg = 1;
tableLookup(L, "do_save_bg", do_save_bg);
std::string tmp = "true";
tableLookup(L, "do_save_bg", tmp);
bool do_save_bg = (tmp == "true" || tmp == "1" || tmp == "yes");
CLuaSignalBox *m = SignalBoxCheck(L, 1);
if (!m)
return 0;
m->s->paint((do_save_bg!=0)?true:false);
m->s->paint(do_save_bg);
return 0;
}