diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2016-04-22 18:30:55 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2016-04-22 18:30:55 -0400 |
| commit | 534ce8e8612da3ba6d610a782eeaf10c9135b947 (patch) | |
| tree | ae9439ae6152e3cadb70f8a7d0a916ca4ddf9317 /gamemode/client/cl_quickmenu.lua | |
| parent | 22eac37611121d7e6ed7027c1ede37928fea40c3 (diff) | |
| download | gmstranded-534ce8e8612da3ba6d610a782eeaf10c9135b947.tar.gz gmstranded-534ce8e8612da3ba6d610a782eeaf10c9135b947.tar.bz2 gmstranded-534ce8e8612da3ba6d610a782eeaf10c9135b947.zip | |
Started split to expidition
Diffstat (limited to 'gamemode/client/cl_quickmenu.lua')
| -rw-r--r-- | gamemode/client/cl_quickmenu.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gamemode/client/cl_quickmenu.lua b/gamemode/client/cl_quickmenu.lua new file mode 100644 index 0000000..2ce0bbb --- /dev/null +++ b/gamemode/client/cl_quickmenu.lua @@ -0,0 +1,19 @@ +function GM:OnContextMenuOpen() + print("Context menu hooked correctly") + local Menu = DermaMenu() -- Is the same as vgui.Create( "DMenu" ) + Menu:AddOption( "Simple option" ) -- Add a simple option. + + local btnWithIcon = Menu:AddOption( "Option with icon" ) -- Simple option, but we're going to add an icon + btnWithIcon:SetIcon( "icon16/bug.png" ) -- Icons are in materials/icon16 folder + + Menu:AddSpacer() -- Adds a simple line spacer + + local SubMenu = Menu:AddSubMenu( "A Sub Menu" ) -- Add a submenu + SubMenu:AddOption( "Sub Option #1" ):SetIcon( "icon16/group.png" ) -- SetIcon possible like this + + Menu:Open() +end + +function GM:OnContextMenuClose() + +end |
