summaryrefslogtreecommitdiff
path: root/gamemode/client
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2016-05-05 20:01:07 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2016-05-05 20:01:07 -0400
commitb738117470b21fbc75f0c126ba7d70052176a2aa (patch)
tree57afcd5d9a895aa61e3e2ffcf80a2fc3bfa48725 /gamemode/client
parent2c92bbbbf0770e90a1f80494dcd959d214675ac9 (diff)
downloadgmstranded-b738117470b21fbc75f0c126ba7d70052176a2aa.tar.gz
gmstranded-b738117470b21fbc75f0c126ba7d70052176a2aa.tar.bz2
gmstranded-b738117470b21fbc75f0c126ba7d70052176a2aa.zip
Added camp fire
Diffstat (limited to 'gamemode/client')
-rw-r--r--gamemode/client/cl_inventory.lua31
1 files changed, 24 insertions, 7 deletions
diff --git a/gamemode/client/cl_inventory.lua b/gamemode/client/cl_inventory.lua
index 730ce78..076dd2a 100644
--- a/gamemode/client/cl_inventory.lua
+++ b/gamemode/client/cl_inventory.lua
@@ -539,17 +539,24 @@ function PANEL:Init()
end
return MatSelectPanel
end
+ self.PanelProxy.ClearControls = function()
+ self.PanelProxy.cp:Clear()
+ end
+ self.PanelProxy.AddItem = function(self,item)
+ print("----------AddItem called!--------------")
+ print("Adding:")
+ print(item)
+ local output = self.cp:AddItem(item)
+ print("-----------AddItem finished!-----------")
+ return output
+ end
self.PanelProxy.AddControl = function(self,type,table)
print("Adding control...")
print("Type:" .. type)
- print("Table:")
- PrintTable(table)
- print("I am:")
- PrintTable(self)
if(type == "Header") then
self.cp:ControlHelp(table.Description)
elseif(type == "Slider") then
- self.cp:NumSlider(table.Label,table.Command,table.Min,table.Max,0)
+ return self.cp:NumSlider(table.Label,table.Command,table.Min,table.Max,0)
elseif(type == "Checkbox") then
self.cp:CheckBox(table.Label,table.Command)
elseif(type == "RopeMaterial") then
@@ -585,8 +592,11 @@ function PANEL:Init()
GetConVar(colorvars["Blue"]):SetInt(t.b)
end
self.cp:AddItem(color,color_cube)
+ --[[
elseif(type == "ComboBox") then
- local DComboBox = vgui.Create( "DComboBox" )
+
+ print("Createing combo box!")
+ local DComboBox, label = self.cp:ComboBox(table.Label, nil)
for k,v in pairs(table.Options) do
DComboBox:AddChoice(k,v)
end
@@ -596,7 +606,9 @@ function PANEL:Init()
GetConVar(k):SetInt(v)
end
end
+ print("Adding combo box to control")
self.cp:AddItem(DComboBox)
+ print("Done!")
elseif(type == "PropSelect") then
local grid = vgui.Create( "DGrid" )
grid:SetPos( 10, 30 )
@@ -612,6 +624,11 @@ function PANEL:Init()
grid:AddItem(icon)
end
self.cp:AddItem(grid)
+ ]]
+ elseif(type == "Label") then
+ self.cp:AddItem(vgui.Create("DLabel"):SetText(table.Text))
+ elseif(type == "Button") then
+ self.cp:Button(table.Label,table.Command)
else
print("I wanted to add a control, but I haven't written it yet!")
print("Type:" .. type)
@@ -1121,7 +1138,7 @@ function PANEL:Init()
end
function PANEL:Paint()
-
+
draw.RoundedBox(0,0,0,self:GetWide(), self:GetTall(), Color(48,48,48,125))
end