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_inventory.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_inventory.lua')
| -rw-r--r-- | gamemode/client/cl_inventory.lua | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/gamemode/client/cl_inventory.lua b/gamemode/client/cl_inventory.lua new file mode 100644 index 0000000..9e18040 --- /dev/null +++ b/gamemode/client/cl_inventory.lua @@ -0,0 +1,43 @@ +print("Custom inventory loaded") + +local function createPanel() + local frame = vgui.Create( "DFrame" ) + frame:SetSize( 300, 300 ) + frame:SetTitle( "Inventory" ) + frame:MakePopup() + frame:Center() + + local layout = vgui.Create( "DTileLayout", frame ) + layout:SetBaseSize( 32 ) -- Tile size + layout:Dock( FILL ) + + //Draw a background so we can see what it's doing + --layout:SetDrawBackground( true ) + --layout:SetBackgroundColor( Color( 0, 100, 100 ) ) + + layout:MakeDroppable( "unique_name" ) -- Allows us to rearrange children + for k, v in SortedPairs( Resources ) do + layout:Add( Label( v .. k) ) + end + /* + for i = 1, 32 do + layout:Add( Label( " Label " .. i ) ) + end + */ +end + +local invpanel = nil +function GM:OnSpawnMenuOpen() + print("Spawn menu hooked correctly") + if(invpanel == nil) then + invpanel = createPanel() + end +end + +function GM:OnSpawnMenuClose() + +end + +function GM:SpawnMenuEnabled() + return false +end |
