mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-10 00:43:27 +02:00
commit
9c76fb02bb
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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()
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user