From a837a971009a95a4d838a2fd6ea8816fd97d8b9f Mon Sep 17 00:00:00 2001 From: Gerkiz Date: Sun, 5 Dec 2021 22:35:38 +0100 Subject: [PATCH] minor fix --- comfy_panel/main.lua | 8 ++------ comfy_panel/poll.lua | 2 +- maps/mountain_fortress_v3/ic/gui.lua | 2 +- modules/rpg.lua | 2 +- modules/rpg/gui.lua | 2 +- 5 files changed, 6 insertions(+), 10 deletions(-) diff --git a/comfy_panel/main.lua b/comfy_panel/main.lua index a2afa2fe..7f2cb4bd 100644 --- a/comfy_panel/main.lua +++ b/comfy_panel/main.lua @@ -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 diff --git a/comfy_panel/poll.lua b/comfy_panel/poll.lua index 59d9f38a..89f51075 100644 --- a/comfy_panel/poll.lua +++ b/comfy_panel/poll.lua @@ -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 diff --git a/maps/mountain_fortress_v3/ic/gui.lua b/maps/mountain_fortress_v3/ic/gui.lua index de14b507..d0b2d2d9 100644 --- a/maps/mountain_fortress_v3/ic/gui.lua +++ b/maps/mountain_fortress_v3/ic/gui.lua @@ -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 diff --git a/modules/rpg.lua b/modules/rpg.lua index e0bca7e8..0635f7ce 100644 --- a/modules/rpg.lua +++ b/modules/rpg.lua @@ -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() diff --git a/modules/rpg/gui.lua b/modules/rpg/gui.lua index 82a5aaf7..89f0da7d 100644 --- a/modules/rpg/gui.lua +++ b/modules/rpg/gui.lua @@ -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