remove core.set_title & fix app.reset_content args & update app.reconfig_packs

This commit is contained in:
MihailRis 2026-01-07 00:19:34 +03:00
parent 9d4a48096e
commit 43fa181398
3 changed files with 20 additions and 20 deletions

View file

@ -96,6 +96,12 @@ static int l_reset_content_sources(lua::State* L) {
return 0;
}
static int l_set_title(lua::State* L) {
auto title = lua::require_string(L, 1);
engine->getWindow().setTitle(title);
return 0;
}
const luaL_Reg applib[] = {
{"start_debug_instance", lua::wrap<l_start_debug_instance>},
{"focus", lua::wrap<l_focus>},
@ -103,6 +109,7 @@ const luaL_Reg applib[] = {
{"get_content_sources", lua::wrap<l_get_content_sources>},
{"set_content_sources", lua::wrap<l_set_content_sources>},
{"reset_content_sources", lua::wrap<l_reset_content_sources>},
{"set_title", lua::wrap<l_set_title>},
// for other functions see libcore.cpp and stdlib.lua
{nullptr, nullptr}
};

View file

@ -300,12 +300,6 @@ static int l_capture_output(lua::State* L) {
return 1;
}
static int l_set_title(lua::State* L) {
auto title = lua::require_string(L, 1);
engine->getWindow().setTitle(title);
return 0;
}
const luaL_Reg corelib[] = {
{"blank", lua::wrap<l_blank>},
{"get_version", lua::wrap<l_get_version>},
@ -327,6 +321,5 @@ const luaL_Reg corelib[] = {
{"open_url", lua::wrap<l_open_url>},
{"quit", lua::wrap<l_quit>},
{"capture_output", lua::wrap<l_capture_output>},
{"set_title", lua::wrap<l_set_title>},
{nullptr, nullptr}
};