Merge remote-tracking branch 'broken/next-cc'

This commit is contained in:
Stefan Seyfried
2014-01-28 13:22:00 +01:00
10 changed files with 79 additions and 38 deletions

View File

@@ -763,7 +763,7 @@ int CLuaMenuForwarder::exec(CMenuTarget* /*parent*/, const std::string & /*actio
lua_pushstring(L, luaId.c_str());
int status = lua_pcall(L, 1 /* one arg */, 1 /* one result */, 0);
if (status) {
fprintf(stderr, "[CLuaInstance::%s] error in script: %s\n", __func__, lua_tostring(L, -1));
fprintf(stderr, "[CLuaMenuForwarder::%s] error in script: %s\n", __func__, lua_tostring(L, -1));
ShowMsg2UTF("Lua script error:", lua_tostring(L, -1), CMsgBox::mbrBack, CMsgBox::mbBack);
}
if (lua_isnumber(L, -1))
@@ -915,6 +915,10 @@ int CLuaInstance::MenuAddItem(lua_State *L)
std::string type; tableLookup(L, "type", type);
if (type == "back") {
m->m->addItem(GenericMenuBack);
} else if (type == "next") {
m->m->addItem(GenericMenuNext);
} else if (type == "cancel") {
m->m->addItem(GenericMenuCancel);
} else if (type == "separator") {
m->m->addItem(GenericMenuSeparator);
} else if (type == "separatorline") {