1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-10 00:43:27 +02:00

Merge pull request #185 from ComfyFactory/minor_fix

Minor change
This commit is contained in:
Gerkiz 2021-12-05 22:38:10 +01:00 committed by GitHub
commit 9c76fb02bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 10 deletions

View File

@ -55,13 +55,10 @@ function Public.get(key)
end
end
function Public.comfy_panel_clear_left_gui(player)
function Public.comfy_panel_clear_gui(player)
for _, child in pairs(player.gui.left.children) do
child.destroy()
end
end
function Public.comfy_panel_clear_screen_gui(player)
for _, child in pairs(player.gui.screen.children) do
child.destroy()
end
@ -121,8 +118,7 @@ end
local function main_frame(player)
local tabs = main_gui_tabs
Public.comfy_panel_clear_left_gui(player)
Public.comfy_panel_clear_screen_gui(player)
Public.comfy_panel_clear_gui(player)
local frame = player.gui.left.comfy_panel
if not frame or not frame.valid then

View File

@ -397,7 +397,7 @@ local function toggle(event)
if main_frame then
remove_main_frame(main_frame, left, event.player)
else
Tabs.comfy_panel_clear_left_gui(event.player)
Tabs.comfy_panel_clear_gui(event.player)
draw_main_frame(left, event.player)
end
end

View File

@ -449,7 +449,7 @@ local function toggle(player, recreate)
if main_frame then
remove_main_frame(main_frame)
else
Tabs.comfy_panel_clear_left_gui(player)
Tabs.comfy_panel_clear_gui(player)
draw_main_frame(player)
end
end

View File

@ -251,7 +251,7 @@ local function draw_gui(player, forced)
end
end
Tabs.comfy_panel_clear_left_gui(player)
Tabs.comfy_panel_clear_gui(player)
if player.gui.left.rpg then
player.gui.left.rpg.destroy()

View File

@ -515,7 +515,7 @@ function Public.toggle(player, recreate)
if main_frame then
remove_main_frame(main_frame, screen)
else
ComfyGui.comfy_panel_clear_left_gui(player)
ComfyGui.comfy_panel_clear_gui(player)
draw_main_frame(player)
end
end