diff options
| -rw-r--r-- | gamemode/client/cl_inventory.lua | 29 |
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 |
