core: expose rescan_project_directories and configure_borderless_window

This commit is contained in:
jgmdev 2022-05-02 13:55:25 -04:00
parent d3c38d699c
commit b5fe333345
1 changed files with 6 additions and 6 deletions

View File

@ -294,7 +294,7 @@ end
-- The function below is needed to reload the project directories -- The function below is needed to reload the project directories
-- when the project's module changes. -- when the project's module changes.
local function rescan_project_directories() function core.rescan_project_directories()
local save_project_dirs = {} local save_project_dirs = {}
local n = #core.project_directories local n = #core.project_directories
for i = 1, n do for i = 1, n do
@ -574,7 +574,7 @@ function core.remove_project_directory(path)
end end
local function configure_borderless_window() function core.configure_borderless_window()
system.set_window_bordered(not config.borderless) system.set_window_bordered(not config.borderless)
core.title_view:configure_hit_test(config.borderless) core.title_view:configure_hit_test(config.borderless)
core.title_view.visible = config.borderless core.title_view.visible = config.borderless
@ -590,8 +590,8 @@ local function add_config_files_hooks()
doc_save(self, filename, abs_filename) doc_save(self, filename, abs_filename)
if self.abs_filename == user_filename or self.abs_filename == module_filename then if self.abs_filename == user_filename or self.abs_filename == module_filename then
reload_customizations() reload_customizations()
rescan_project_directories() core.rescan_project_directories()
configure_borderless_window() core.configure_borderless_window()
end end
end end
end end
@ -752,7 +752,7 @@ function core.init()
command.perform("core:open-log") command.perform("core:open-log")
end end
configure_borderless_window() core.configure_borderless_window()
if #plugins_refuse_list.userdir.plugins > 0 or #plugins_refuse_list.datadir.plugins > 0 then if #plugins_refuse_list.userdir.plugins > 0 or #plugins_refuse_list.datadir.plugins > 0 then
local opt = { local opt = {