diff --git a/addons/spraymesh_extended/lua/spraymesh/client/cl_init.lua b/addons/spraymesh_extended/lua/spraymesh/client/cl_init.lua index 76a1a8f..eea8221 100644 --- a/addons/spraymesh_extended/lua/spraymesh/client/cl_init.lua +++ b/addons/spraymesh_extended/lua/spraymesh/client/cl_init.lua @@ -951,10 +951,10 @@ concommand.Add("spraymesh_reload", function() spraymesh.ReloadSprays() end) -local SETTINGS_PANEL = nil +spraymesh.SETTINGS_PANEL = nil concommand.Add("spraymesh_settings", function() - if IsValid(SETTINGS_PANEL) then SETTINGS_PANEL:Close() end - SETTINGS_PANEL = vgui.Create("DSprayConfiguration") + if IsValid(spraymesh.SETTINGS_PANEL) then spraymesh.SETTINGS_PANEL:Remove() end + spraymesh.SETTINGS_PANEL = vgui.Create("DSprayConfiguration") end) local VIEWER_PANEL = nil diff --git a/addons/spraymesh_extended/lua/spraymesh/client/cl_sandbox_context_menu.lua b/addons/spraymesh_extended/lua/spraymesh/client/cl_sandbox_context_menu.lua index 675692b..c029b61 100644 --- a/addons/spraymesh_extended/lua/spraymesh/client/cl_sandbox_context_menu.lua +++ b/addons/spraymesh_extended/lua/spraymesh/client/cl_sandbox_context_menu.lua @@ -12,9 +12,9 @@ list.Set("DesktopWindows", "SprayMeshExtended", { -- Remove basic frame and replace with our custom VGUI element window:Remove() - if IsValid(screenshot_editor.PANEL) then screenshot_editor.PANEL:Remove() end + if IsValid(spraymesh.SETTINGS_PANEL) then spraymesh.SETTINGS_PANEL:Remove() end local mainWindow = vgui.Create("DSprayConfiguration") - screenshot_editor.PANEL = mainWindow + spraymesh.SETTINGS_PANEL = mainWindow icon.Window = mainWindow end