Lua: refactor script api, more doc, add button for Open Lua Scripts Folder (#1588)

* lua manager: pass down the scripts folder to the instance instead of hard coding calls to the file manager everywhere
* lua: add open lua scripts folder button
* lua api: change script binding so that user cannot by mistake try to sleep or yield in a non script context
This commit is contained in:
Quentin
2023-07-03 13:01:12 +02:00
committed by GitHub
parent 7c927e0cfb
commit 6d6848c2fb
8 changed files with 186 additions and 58 deletions

View File

@ -53,7 +53,14 @@ namespace big
{
g_lua_manager->m_schedule_reload_modules = true;
}
ImGui::SameLine();
ImGui::Checkbox("Auto Reload Changed Scripts", &g.lua.enable_auto_reload_changed_scripts);
if (components::button("Open Lua Scripts Folder"))
{
std::string command = "explorer.exe /select," + g_lua_manager->get_scripts_folder().get_path().string();
std::system(command.c_str());
}
}
}