From cb7ab3cc7bec244cd6874fe086e3b1aed9f77a6c Mon Sep 17 00:00:00 2001 From: Rubat <3299036+robotboy655@users.noreply.github.com> Date: Wed, 19 Apr 2023 16:26:04 +0300 Subject: [PATCH] Move derma icon browser to a more sensible place So we don't have to worry about forcing clients to download a pointless file that returns on execution --- garrysmod/lua/derma/init.lua | 1 - garrysmod/lua/includes/extensions/string.lua | 1 - garrysmod/lua/includes/init_menu.lua | 2 ++ garrysmod/lua/{derma => menu}/derma_icon_browser.lua | 2 -- 4 files changed, 2 insertions(+), 4 deletions(-) rename garrysmod/lua/{derma => menu}/derma_icon_browser.lua (97%) diff --git a/garrysmod/lua/derma/init.lua b/garrysmod/lua/derma/init.lua index 218b77ac88..d5f29b927b 100644 --- a/garrysmod/lua/derma/init.lua +++ b/garrysmod/lua/derma/init.lua @@ -50,7 +50,6 @@ include( "derma_menus.lua" ) include( "derma_animation.lua" ) include( "derma_utils.lua" ) include( "derma_gwen.lua" ) -include( "derma_icon_browser.lua" ) function Derma_Hook( panel, functionname, hookname, typename ) diff --git a/garrysmod/lua/includes/extensions/string.lua b/garrysmod/lua/includes/extensions/string.lua index 445ba27131..179550f1fe 100644 --- a/garrysmod/lua/includes/extensions/string.lua +++ b/garrysmod/lua/includes/extensions/string.lua @@ -18,7 +18,6 @@ function string.ToTable( input ) return tbl end - --[[--------------------------------------------------------- Name: string.JavascriptSafe( string ) Desc: Takes a string and escapes it for insertion in to a JavaScript string diff --git a/garrysmod/lua/includes/init_menu.lua b/garrysmod/lua/includes/init_menu.lua index f3a4037793..cce32328c2 100644 --- a/garrysmod/lua/includes/init_menu.lua +++ b/garrysmod/lua/includes/init_menu.lua @@ -42,3 +42,5 @@ include( "util/javascript_util.lua" ) include( "util/tooltips.lua" ) require( "notification" ) + +include( "menu/derma_icon_browser.lua" ) diff --git a/garrysmod/lua/derma/derma_icon_browser.lua b/garrysmod/lua/menu/derma_icon_browser.lua similarity index 97% rename from garrysmod/lua/derma/derma_icon_browser.lua rename to garrysmod/lua/menu/derma_icon_browser.lua index afd018220b..6b5d3d3bc9 100644 --- a/garrysmod/lua/derma/derma_icon_browser.lua +++ b/garrysmod/lua/menu/derma_icon_browser.lua @@ -1,5 +1,3 @@ --- Keep the icon browser as part of the menu UI - convenient for quickly pressing ESC to open/close icon browser once derma_icon_browser has been run -if not MENU_DLL then return end function Derma_OpenIconBrowser() -- Because the icon browser will be part of the menu, activate the menu so that it definitely shows up otherwise a derma_icon_browser bind does nothing