wyozi / wmc-plus

Media center addon for Garry's Mod
MIT License
1 stars 1 forks source link

Add a right-click hook for media list items #1

Closed yupi2 closed 9 years ago

yupi2 commented 9 years ago

Here's an example of usage

hook.Add("WMCPMedialistRowRightClick", "WMCPAddDebugItem", function(menu, id, line, media)
    menu:AddSpacer()

    menu:AddOption("Print data", function()
        print("Printing debug data from WMCP")
        print("menu: ", menu)
        print("id: ", id)
        print("line:", line)
        print("media:")
        PrintTable(media or {}, 1)
        print("")
    end):SetImage("icon16/lightning.png")
end)
wyozi commented 9 years ago

Good stuff. :+1: