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:
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user