From 0ae33ad32868af226fba6d887320aa87aa19d3a4 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Sat, 20 May 2017 13:15:45 -0400 Subject: Fixed models drawing in inventory --- gamemode/inventorysystem/equipment/cl_equipment.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gamemode/inventorysystem/equipment') diff --git a/gamemode/inventorysystem/equipment/cl_equipment.lua b/gamemode/inventorysystem/equipment/cl_equipment.lua index 82560be..74152dc 100644 --- a/gamemode/inventorysystem/equipment/cl_equipment.lua +++ b/gamemode/inventorysystem/equipment/cl_equipment.lua @@ -124,12 +124,12 @@ inv.DrawOnDPanel = function(self,panel) end print("Found something equiped in ", k) if self.equiped[k].OnEqpPaint then - pn.Paint = self.equiped[k].OnEqpPaint + pn.PaintOver = self.equiped[k].OnEqpPaint end else --We don't have something equiped! if v.img and v.img.material then local c = col.ui.border - pn.Paint = function(tp,w,h) + pn.PaintOver = function(tp,w,h) surface.SetDrawColor(c.r,c.g,c.b) surface.DrawOutlinedRect(0, 0, w, h) surface.SetDrawColor(255,255,255) @@ -155,9 +155,9 @@ inv.DrawOnDPanel = function(self,panel) end end if item.OnEqpPaint then - self[position[1]].Paint = item.OnEqpPaint + self[position[1]].PaintOver = item.OnEqpPaint else - self[position[1]].Paint = function(panel) + self[position[1]].PaintOver = function(panel) draw.DrawText( item.Name, "DermaDefault", 10, 10, Color( 0, 0, 0, 0 )) end end @@ -170,7 +170,7 @@ inv.DrawOnDPanel = function(self,panel) local pn = self[position[1]] pn.DoClick = function() end local c = col.ui.border - pn.Paint = function(self,w,h) + pn.PaintOver = function(self,w,h) surface.SetDrawColor(c.r,c.g,c.b) surface.DrawOutlinedRect(0, 0, w, h) surface.SetDrawColor(255,255,255) -- cgit v1.2.3-70-g09d2