theme_name added
This commit is contained in:
parent
d583c5cf67
commit
6d802759d2
|
@ -578,6 +578,13 @@ static int luaB_theme_var(lua_State *L) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int luaB_theme_name(lua_State *L) {
|
||||||
|
if (game_own_theme && opt_owntheme)
|
||||||
|
return 0;
|
||||||
|
lua_pushstring(L, curtheme_dir);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
extern int dir_iter_factory (lua_State *L);
|
extern int dir_iter_factory (lua_State *L);
|
||||||
extern int luaopen_lfs (lua_State *L);
|
extern int luaopen_lfs (lua_State *L);
|
||||||
|
|
||||||
|
@ -1549,6 +1556,7 @@ static const luaL_Reg base_funcs[] = {
|
||||||
{"get_steadpath", luaB_get_steadpath},
|
{"get_steadpath", luaB_get_steadpath},
|
||||||
{"set_timer", luaB_set_timer},
|
{"set_timer", luaB_set_timer},
|
||||||
{"theme_var", luaB_theme_var},
|
{"theme_var", luaB_theme_var},
|
||||||
|
{"theme_name", luaB_theme_name},
|
||||||
{"readdir", dir_iter_factory},
|
{"readdir", dir_iter_factory},
|
||||||
{"menu_toggle", luaB_show_menu},
|
{"menu_toggle", luaB_show_menu},
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,9 @@ theme = {
|
||||||
theme.vars[name] = tostring(val);
|
theme.vars[name] = tostring(val);
|
||||||
end
|
end
|
||||||
end;
|
end;
|
||||||
|
name = function()
|
||||||
|
return theme_name(name);
|
||||||
|
end;
|
||||||
get = function(name)
|
get = function(name)
|
||||||
return theme_var(name);
|
return theme_var(name);
|
||||||
end;
|
end;
|
||||||
|
|
Reference in a new issue