Skip to content

Commit

Permalink
Add tool copying (#2186)
Browse files Browse the repository at this point in the history
  • Loading branch information
darkfated authored Jan 17, 2025
1 parent 9dcf4dd commit 4bf2cff
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions garrysmod/gamemodes/sandbox/gamemode/spawnmenu/toolpanel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@ function PANEL:AddCategory( name, catName, tItems )
spawnmenu.ActivateTool( button.Name )

end
item.DoRightClick = function( button )
local menu = DermaMenu()
menu:AddOption( "#spawnmenu.menu.copy", function() SetClipboardText( button.Name ) end ):SetIcon( "icon16/page_copy.png" )
menu:Open()
end

item.ControlPanelBuildFunction = v.CPanelFunction
item.Command = v.Command
Expand Down

0 comments on commit 4bf2cff

Please sign in to comment.