Add THEME:get_theme_fallback_list function.

This commit is contained in:
Kyzentun Keeslala
2018-02-05 09:12:35 -07:00
parent e233ea291c
commit 02dd2522e3
+13
View File
@@ -1446,6 +1446,18 @@ public:
return 0;
}
static int get_theme_fallback_list(T* p, lua_State* L)
{
lua_createtable(L, g_vThemes.size(), 0);
int ret= lua_gettop(L);
for(size_t tid= 0; tid < g_vThemes.size(); ++tid)
{
lua_pushstring(L, g_vThemes[tid].sThemeName.c_str());
lua_rawseti(L, ret, tid+1);
}
return 1;
}
LunaThemeManager()
{
ADD_METHOD( ReloadMetrics );
@@ -1473,6 +1485,7 @@ public:
ADD_METHOD( GetMetricNamesInGroup );
ADD_METHOD( GetStringNamesInGroup );
ADD_METHOD( SetTheme );
ADD_METHOD(get_theme_fallback_list);
}
};