diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2016-04-30 22:11:53 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2016-04-30 22:11:53 -0400 |
| commit | 052d3aad1a4b3e13a6c4f50095fdc9803701c857 (patch) | |
| tree | fc0b3be7b2a02e95bb7cb3037d0f8508e945e0ba /ftp_gmstranded/gamemode/cl_panels.lua | |
| parent | bdf6cacc1fe7af364b93604253f3229d842d6170 (diff) | |
| download | gmstranded-052d3aad1a4b3e13a6c4f50095fdc9803701c857.tar.gz gmstranded-052d3aad1a4b3e13a6c4f50095fdc9803701c857.tar.bz2 gmstranded-052d3aad1a4b3e13a6c4f50095fdc9803701c857.zip | |
Added combinations tab to the q menu
Diffstat (limited to 'ftp_gmstranded/gamemode/cl_panels.lua')
| -rw-r--r-- | ftp_gmstranded/gamemode/cl_panels.lua | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/ftp_gmstranded/gamemode/cl_panels.lua b/ftp_gmstranded/gamemode/cl_panels.lua index da01d3c..4a1f85d 100644 --- a/ftp_gmstranded/gamemode/cl_panels.lua +++ b/ftp_gmstranded/gamemode/cl_panels.lua @@ -1,5 +1,5 @@ -surface.CreateFont( "DefaultBold", { +surface.CreateFont( "DefaultBold", { font = "Tahoma", size = 16, weight = 1000, @@ -7,7 +7,7 @@ surface.CreateFont( "DefaultBold", { additive = false } ) -surface.CreateFont( "GMSUnlockDescription", { +surface.CreateFont( "GMSUnlockDescription", { font = "Tahoma", size = 14, weight = 500, @@ -209,7 +209,7 @@ function PANEL:Paint() surface.DrawLine( self:GetWide() - 1, 0, self:GetWide() - 1, self:GetTall() ) -- Nice line instead of messy outlined rect surface.DrawLine( 0, self:GetTall() - 1, self:GetWide(), self:GetTall() - 1 ) surface.DrawLine( 0, 0, 0, self:GetTall() ) - if ( self.Extended ) then + if ( self.Extended ) then surface.DrawLine( 0, 33, self:GetWide(), 33 ) end @@ -236,8 +236,8 @@ function PANEL:RefreshSkills() if ( !self.Extended ) then lbl:SetVisible( false ) end end - if ( self.Extended ) then - self:SetSize( ScrW() / 6, 40 + ( table.Count( self.SkillLabels ) * 21 ) ) + if ( self.Extended ) then + self:SetSize( ScrW() / 6, 40 + ( table.Count( self.SkillLabels ) * 21 ) ) end end @@ -351,9 +351,9 @@ function PANEL:RefreshResources() if ( !self.Extended ) then lbl:SetVisible( false ) end end end - + self.Line = self.Line + 21 - + local lblT = vgui.Create( "gms_ResourcePanelTotal", self ) lblT:SetPos( 0, self.Line ) lblT:SetSize( self:GetWide(), 16 ) @@ -362,10 +362,10 @@ function PANEL:RefreshResources() table.insert( self.ResourceLabels, lblT ) if ( !self.Extended ) then lblT:SetVisible( false ) end - if ( self.Extended ) then - self:SetSize( ScrW() / 6, 40 + ( ( table.Count( self.ResourceLabels ) + 1 ) * 21 ) ) + if ( self.Extended ) then + self:SetSize( ScrW() / 6, 40 + ( ( table.Count( self.ResourceLabels ) + 1 ) * 21 ) ) end - + if ( GAMEMODE.CommandsHud ) then GAMEMODE.CommandsHud:SetPos( ScrW() / 6 + 2, self:GetTall() ) end end @@ -602,8 +602,8 @@ function PANEL:RefreshCommands() local line7b = self:CreateButton( halfsize, self.Line, threesize, 16, "gms_tribes", "Join", Color( 200, 0, 200, 176 ) ) local line7c = self:CreateButton( halfsize + threesize, self.Line, threesize, 16, "gms_leave", "Leave", Color( 200, 0, 200, 176 ) ) - if ( self.Extended ) then - self:SetSize( ScrW() / 6, 40 + ( self.Lines * 21 ) ) + if ( self.Extended ) then + self:SetSize( ScrW() / 6, 40 + ( self.Lines * 21 ) ) end end @@ -840,6 +840,8 @@ function PANEL:Init() local combi = p.CombiGroupName or "" local active = p.ActiveCombi or "" p:Close() + print("Doing") + print("gms_MakeCombination " .. combi .. " " .. active .. "\n") LocalPlayer():ConCommand( "gms_MakeCombination " .. combi .. " " .. active .. "\n" ) end @@ -872,7 +874,7 @@ function PANEL:SetActive( combi, tbl ) if ( tbl.Req or tbl.SkillReq ) then desc = desc .. "\n\nYou need:" end - + if ( tbl.Req and table.Count( tbl.Req ) > 0 ) then for res, num in pairs( tbl.Req ) do if ( tbl.AllSmelt ) then @@ -898,7 +900,7 @@ end function PANEL:ClearActive() self.ActiveCombi = nil - self.ActiveTable = nil + self.ActiveTable = nil self.Info.NameLabel:SetText( "Select a recipe" ) self.Info.DescLabel:SetText( "" ) end @@ -1155,4 +1157,4 @@ function PANEL:SetRes( str, num, isAll ) self.IsAll = isAll end -vgui.Register( "gms_StoreButton", PANEL, "DButton" )
\ No newline at end of file +vgui.Register( "gms_StoreButton", PANEL, "DButton" ) |
