Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions lua/wire/client/customspawnmenu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

AccessorFunc( PANEL, "m_TabID", "TabID" )

local expand_all = CreateConVar( "wire_tool_menu_expand_all", 0, {FCVAR_ARCHIVE} )

Check warning on line 6 in lua/wire/client/customspawnmenu.lua

View workflow job for this annotation

GitHub Actions / lint

"Unused variable"

Unused variable: expand_all
local separate_wire_extras = CreateConVar( "wire_tool_menu_separate_wire_extras", 1, {FCVAR_ARCHIVE} )
local hide_duplicates = CreateConVar( "wire_tool_menu_hide_duplicates", 0, {FCVAR_ARCHIVE} )
local custom_for_all_tabs = CreateConVar( "wire_tool_menu_custom_menu_for_all_tabs", 0, {FCVAR_ARCHIVE} )
Expand Down Expand Up @@ -125,7 +125,7 @@
self.List:Dock( FILL )

self.SearchList = vgui.Create( "DListView", LeftPanel )
local x,y = self.List:GetPos()

Check warning on line 128 in lua/wire/client/customspawnmenu.lua

View workflow job for this annotation

GitHub Actions / lint

"Unused variable"

Unused variable: y
local w,h = self.List:GetSize()
self.SearchList:SetPos( x + w, 160 )
self.SearchList:SetSize( w, h )
Expand Down Expand Up @@ -565,13 +565,14 @@
v.Category = Label
v.CategoryID = CategoryID

local icon = "icon16/wrench.png"
local icon = Label == "Options" and "icon16/cog.png" or "icon16/wrench.png"

if custom_icons:GetBool() then
local tooltbl = weapons.Get("gmod_tool").Tool[v.ItemName]
if tooltbl then
if tooltbl.Wire_ToolMenuIcon then
icon = tooltbl.Wire_ToolMenuIcon
local tool = weapons.GetStored("gmod_tool").Tool[v.ItemName]

if tool then
if tool.Wire_ToolMenuIcon then
icon = tool.Wire_ToolMenuIcon
end
end
end
Expand Down Expand Up @@ -654,11 +655,11 @@

local function CreateCPanel( panel )
local checkbox = panel:CheckBox( "Use wire's custom tool menu for all tabs", "wire_tool_menu_custom_menu_for_all_tabs" )
checkbox:SetToolTip( "Requires rejoin to take effect" )

Check warning on line 658 in lua/wire/client/customspawnmenu.lua

View workflow job for this annotation

GitHub Actions / lint

"Deprecated"

Deprecated: Use :SetTooltip instead, notice the lowercase fucking t

if WireLib.WireExtrasInstalled then
local SeparateWireExtras = panel:CheckBox( "Separate Wire Extras", "wire_tool_menu_separate_wire_extras" )
SeparateWireExtras:SetToolTip( "Whether or not to separate wire extras tools into its own category." )

Check warning on line 662 in lua/wire/client/customspawnmenu.lua

View workflow job for this annotation

GitHub Actions / lint

"Deprecated"

Deprecated: Use :SetTooltip instead, notice the lowercase fucking t

setUpTabReloadOnChange( SeparateWireExtras )
end
Expand All @@ -669,10 +670,10 @@

local UseIcons = panel:CheckBox( "Use custom icons", "wire_tool_menu_custom_icons" )
setUpTabReloadOnChange( UseIcons )
UseIcons:SetToolTip( "If disabled, all tools will use the 'wrench' icon." )

Check warning on line 673 in lua/wire/client/customspawnmenu.lua

View workflow job for this annotation

GitHub Actions / lint

"Deprecated"

Deprecated: Use :SetTooltip instead, notice the lowercase fucking t

local AutoCollapse = panel:CheckBox( "Autocollapse", "wire_tool_menu_autocollapse" )
AutoCollapse:SetToolTip( "If enabled, opening a category will collapse other categories." )

Check warning on line 676 in lua/wire/client/customspawnmenu.lua

View workflow job for this annotation

GitHub Actions / lint

"Deprecated"

Deprecated: Use :SetTooltip instead, notice the lowercase fucking t

local TabWidth = panel:NumSlider( "Tab width", "wire_tool_menu_tab_width", 300, 3000, 0 )
panel:Help( [[Set the width of all tabs.
Expand Down
2 changes: 2 additions & 0 deletions lua/wire/stools/button.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ if CLIENT then
language.Add( "WireButtonTool_value_on", "Value On:" )
language.Add( "WireButtonTool_value_off", "Value Off:" )
TOOL.Information = { { name = "left", text = "Create/Update " .. TOOL.Name } }

WireToolSetup.setToolMenuIcon( "icon16/add.png" )
end
WireToolSetup.BaseLang()
WireToolSetup.SetupMax( 20 )
Expand Down
2 changes: 2 additions & 0 deletions lua/wire/stools/dynamic_button.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ if CLIENT then
language.Add( "WireDynamicButtonTool_materials_off", "Material Off:" )
language.Add( "WireDynamicButtonTool_colour_on", "Color On:" )
language.Add( "WireDynamicButtonTool_colour_off", "Color Off:" )

WireToolSetup.setToolMenuIcon( "icon16/add.png" )
end
WireToolSetup.BaseLang()
WireToolSetup.SetupMax( 20 )
Expand Down
2 changes: 2 additions & 0 deletions lua/wire/stools/graphics_tablet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ if ( CLIENT ) then
language.Add( "Tool_wire_graphics_tablet_draw_background", "Draw background" )
language.Add( "Tool_wire_graphics_tablet_createflat", "Create flat to surface" )
TOOL.Information = { { name = "left", text = "Create/Update " .. TOOL.Name } }

WireToolSetup.setToolMenuIcon( "icon16/television.png" )
end
WireToolSetup.BaseLang()
WireToolSetup.SetupMax( 20 )
Expand Down
2 changes: 2 additions & 0 deletions lua/wire/stools/interactiveprop.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ if CLIENT then
language.Add("tool.wire_interactiveprop.name", "Wire Interactive Prop")
language.Add("tool.wire_interactiveprop.desc", "Opens a UI panel which controls outputs for use with wire system.")
TOOL.Information = { { name = "left", text = "Create/Update " .. TOOL.Name } }

WireToolSetup.setToolMenuIcon("icon16/plugin.png")
end


Expand Down
2 changes: 2 additions & 0 deletions lua/wire/stools/user.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ if CLIENT then
language.Add("tool.wire_user.desc", "Spawns a constant user prop for use with the wire system.")
language.Add("tool.wire_user.range", "Max Range:")
TOOL.Information = { { name = "left", text = "Create/Update " .. TOOL.Name } }

WireToolSetup.setToolMenuIcon( "icon16/user_add.png" )
end

WireToolSetup.BaseLang()
Expand Down
Loading