From a22cbeddc5f8fb61e87a30aa14ba354de5cf4431 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Sat, 18 Feb 2017 21:55:55 -0500 Subject: Updates --- gamemode/inventorysystem/shapedinventory/cl_shaped.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'gamemode/inventorysystem/shapedinventory/cl_shaped.lua') diff --git a/gamemode/inventorysystem/shapedinventory/cl_shaped.lua b/gamemode/inventorysystem/shapedinventory/cl_shaped.lua index 3bd84c2..c40ffa0 100644 --- a/gamemode/inventorysystem/shapedinventory/cl_shaped.lua +++ b/gamemode/inventorysystem/shapedinventory/cl_shaped.lua @@ -1,5 +1,6 @@ local com = nrequire("cl_common.lua") +local col = nrequire("config/colortheme.lua") local inv = {} @@ -8,7 +9,9 @@ local width = ScrW() local iconsize = width / 40 local function default_paint(self,w,h) - draw.RoundedBox( 8, 0, 0, w, h, Color( 0, 0, 0 ) ) + --Draw a box + surface.SetDrawColor(col.ui.border) + surface.DrawOutlinedRect( 0, 0, w, h ) end --[[ @@ -44,6 +47,7 @@ end local function drawitemat(self,x,y,item) print("Drawing item at ",x,y) local tp = self.gridpanels[x][y] + tp:Droppable("item") runonshape(self,item.Shape,x,y,function(panel) panel:SetVisible(false) end) @@ -60,6 +64,7 @@ end --Reset the position, using the item and it's shape local function undrawitemat(self,x,y) local item = self:Get({x,y}) + self.gridpanels[x][y]:Droppable("") runonshape(self,item.Shape,x,y,function(panel) panel:SetVisible(true) panel:SetSize(iconsize,iconsize) @@ -132,10 +137,10 @@ inv.DrawOnDPanel = function(self,panel) local dp = vgui.Create("DButton") dp:SetSize(iconsize,iconsize) dp.Paint = default_paint - dp:Droppable("item") + --dp:Droppable("item") dp:Receiver("item",com.generatereceiver(),{"one","two","three"}) dp.info = {} - dp.info.owner = LocalPlayer() + dp.info.owner = self.Owner dp.info.id = self.id dp.info.pos = {x,y} dp.info.inv = self -- cgit v1.2.3-70-g09d2