summaryrefslogtreecommitdiff
path: root/gamemode/client/cl_inventory.lua
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2016-05-03 20:56:08 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2016-05-03 20:56:08 -0400
commit243038fb9582d839cb7770ba0c5cffbe2e6904f6 (patch)
tree9371ec99e64de000c100ca68abf26ab05ff3a696 /gamemode/client/cl_inventory.lua
parentdbf40282e8d65b2c5e98e787e3c8fcca4dd6c069 (diff)
downloadgmstranded-243038fb9582d839cb7770ba0c5cffbe2e6904f6.tar.gz
gmstranded-243038fb9582d839cb7770ba0c5cffbe2e6904f6.tar.bz2
gmstranded-243038fb9582d839cb7770ba0c5cffbe2e6904f6.zip
Fixed modles and added scroll bar to tools menu
Diffstat (limited to 'gamemode/client/cl_inventory.lua')
-rw-r--r--gamemode/client/cl_inventory.lua29
1 files changed, 22 insertions, 7 deletions
diff --git a/gamemode/client/cl_inventory.lua b/gamemode/client/cl_inventory.lua
index 98bce3e..0bab5fe 100644
--- a/gamemode/client/cl_inventory.lua
+++ b/gamemode/client/cl_inventory.lua
@@ -513,9 +513,17 @@ function PANEL:Init()
draw.RoundedBox( 4, 0, 0, self:GetWide(), self:GetTall(), Color( 75, 75, 75 ) )
end
- self.ControlPanel = vgui.Create("DForm",self)
- self.ControlPanel:SetSize((dPanelWidth*2)/3,dPanelWidth)
- self.ControlPanel:SetPos(dPanelWidth/3,0)
+ self.Encapsulate = vgui.Create("DScrollPanel",self)
+ self.Encapsulate:SetSize((dPanelWidth/3)*2,dPanelHeight)
+ --self.Encapsulate:SetSize(200,200)
+ self.Encapsulate:SetPos(dPanelWidth/3,0)
+ --self.Encapsulate:EnableVerticalScrollbar(true)
+
+ self.ControlPanel = vgui.Create("DForm")
+ self.ControlPanel:SetSize(((dPanelWidth*2)/3)-15,500)
+ --self.ControlPanel:SetPos(dPanelWidth/3,0)
+ --self.ControlPanel:Dock(FILL)
+ self.Encapsulate:AddItem(self.ControlPanel)
self.PanelProxy = {}
self.PanelProxy.cp = self.ControlPanel
@@ -557,6 +565,7 @@ function PANEL:Init()
elseif(type == "Color") then
local color = vgui.Create( "DRGBPicker" )
local color_cube = vgui.Create( "DColorCube" )
+ color_cube:SetSize(200,200)
local colorvars = {}
local curcolor = {}
for k,v in pairs({"Red","Green","Blue"}) do
@@ -593,13 +602,17 @@ function PANEL:Init()
self.cp:AddItem(DComboBox)
elseif(type == "PropSelect") then
local grid = vgui.Create( "DGrid" )
- grid:SetPos( 10, 30 )
- grid:SetCols( 5 )
- grid:SetColWide( 36 )
+ grid:SetSize(256,64)
+ grid:SetPos( 0, 0 )
+ grid:SetCols( 3 )
+ grid:SetColWide( 128 )
+ grid:SetRowHeight(64)
for k,v in pairs(table.Models) do
local icon = vgui.Create( "DModelPanel", Panel )
- icon:SetSize( 32, 32 )
+ icon:SetSize( 64, 64 )
icon:SetModel( k )
+ icon:SetCamPos( Vector( 15,15,15 ) )
+ icon:SetLookAt( Vector( 0, 0, 1 ) )
icon.DoClick = function()
GetConVar(table.ConVar):SetString(k)
end
@@ -651,6 +664,8 @@ function PANEL:Init()
button.DoClick = function()
--print("Before calling function, PanelProxy is:")
--PrintTable(self.PanelProxy)
+ --self.Encapsulate:SetExpanded(false)
+ --self.Encapsulate:SetExpanded(true)
LocalPlayer():ConCommand(btable.Command)
local cp = controlpanel.Get(btable.Text)
if ( !cp:GetInitialized() ) then