summaryrefslogtreecommitdiff
path: root/gamemode/client/cl_inventory.lua
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/client/cl_inventory.lua')
-rw-r--r--gamemode/client/cl_inventory.lua33
1 files changed, 9 insertions, 24 deletions
diff --git a/gamemode/client/cl_inventory.lua b/gamemode/client/cl_inventory.lua
index 0bab5fe..d3bdd52 100644
--- a/gamemode/client/cl_inventory.lua
+++ b/gamemode/client/cl_inventory.lua
@@ -262,8 +262,8 @@ function PANEL:Init()
end
local img = vgui.Create("DImage", slot)
- img:SetPos(0, 0)
- img:SetSize(slot:GetWide(), slot:GetTall())
+ img:SetPos(20, 10)
+ img:SetSize(slot:GetWide()-40, slot:GetTall()-40)
if(GMS.Resources[k] == nil) then --This resource is not registered!
img:SetImage("vgui/avatar_default")
@@ -513,17 +513,9 @@ function PANEL:Init()
draw.RoundedBox( 4, 0, 0, self:GetWide(), self:GetTall(), Color( 75, 75, 75 ) )
end
- 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.ControlPanel = vgui.Create("DForm",self)
+ self.ControlPanel:SetSize((dPanelWidth*2)/3,dPanelWidth)
+ self.ControlPanel:SetPos(dPanelWidth/3,0)
self.PanelProxy = {}
self.PanelProxy.cp = self.ControlPanel
@@ -565,7 +557,6 @@ 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
@@ -602,17 +593,13 @@ function PANEL:Init()
self.cp:AddItem(DComboBox)
elseif(type == "PropSelect") then
local grid = vgui.Create( "DGrid" )
- grid:SetSize(256,64)
- grid:SetPos( 0, 0 )
- grid:SetCols( 3 )
- grid:SetColWide( 128 )
- grid:SetRowHeight(64)
+ grid:SetPos( 10, 30 )
+ grid:SetCols( 5 )
+ grid:SetColWide( 36 )
for k,v in pairs(table.Models) do
local icon = vgui.Create( "DModelPanel", Panel )
- icon:SetSize( 64, 64 )
+ icon:SetSize( 32, 32 )
icon:SetModel( k )
- icon:SetCamPos( Vector( 15,15,15 ) )
- icon:SetLookAt( Vector( 0, 0, 1 ) )
icon.DoClick = function()
GetConVar(table.ConVar):SetString(k)
end
@@ -664,8 +651,6 @@ 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