From 6cf4530dffa7a6bb72b1bd904e127eb55f4b5c11 Mon Sep 17 00:00:00 2001 From: Scott Date: Sun, 8 May 2016 21:20:00 -0400 Subject: Fixed tribe menu bug --- gamemode/client/cl_inventory.lua | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'gamemode/client/cl_inventory.lua') diff --git a/gamemode/client/cl_inventory.lua b/gamemode/client/cl_inventory.lua index c779384..b3c7d86 100644 --- a/gamemode/client/cl_inventory.lua +++ b/gamemode/client/cl_inventory.lua @@ -38,14 +38,15 @@ local buttons = { txt = "Prop Protection", admin = false, }, - { - txt = "Admin", - admin = true, - }, { txt = "Tribes", admin = false, }, + { + txt = "Admin", + admin = true, + }, + } surface.CreateFont( "gmNameFont", { @@ -1217,7 +1218,12 @@ vgui.Register( "Admin", PANEL, "DPanel" ) local PANEL = {} function PANEL:Init() - local grid = vgui.Create("DGrid",self) + + local dpnl = vgui.Create( "DScrollPanel", self ) + dpnl:SetSize( dPanelWidth, dPanelHeight ) + dpnl:SetPos( 0, 0 ) + + local grid = vgui.Create("DGrid",dpnl) grid:Dock(FILL) local sizelen = 135 grid:SetColWide( sizelen ) @@ -1227,7 +1233,7 @@ function PANEL:Init() tribeb:SetText(v.name) tribeb:SetSize(sizelen,sizelen) tribeb.DoClick = function(self) - if(v.Pass) then + if(v.pass) then Derma_StringRequest( "Please enter password", "Please enter password for the tribe.", @@ -1241,9 +1247,10 @@ function PANEL:Init() end end tribeb.Paint = function(self,w,h) - --local colDor = Color(v.Color.r,v.Color.g,v.Color.b,v.Color.a) - surface.SetDrawColor(v.color) + surface.SetDrawColor(255,255,255) surface.DrawRect(0,0,self:GetWide(),self:GetTall()) + surface.SetDrawColor(v.color) + surface.DrawRect(8,8,self:GetWide()-16,self:GetTall()-16) surface.SetDrawColor(Color(255,255,255,255)) surface.DrawRect(20,(h/2)-10,self:GetWide()-40,20) end @@ -1259,7 +1266,6 @@ function PANEL:Init() end function PANEL:Paint() - end vgui.Register( "Tribes", PANEL, "DPanel" ) -- cgit v1.2.3-70-g09d2