Skip to content

Commit

Permalink
fixed unused stuff and bumped version
Browse files Browse the repository at this point in the history
  • Loading branch information
filipovskis committed May 14, 2022
1 parent 61675da commit e05c575
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
2 changes: 1 addition & 1 deletion lua/autorun/gfconsole_autorun.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Email: tochonement@gmail.com
--]]

gfconsole = {
__VERSION = "1.4.3"
__VERSION = "1.4.4"
}

AddCSLuaFile("gfconsole/libraries/sh_load.lua")
Expand Down
1 change: 0 additions & 1 deletion lua/gfconsole/core/cl_convars.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ local cvColor = CreateClientConVar("cl_gfconsole_color", "green", true, false)
cvars.AddChangeCallback("cl_gfconsole_hidetoolbar", function()
local frame = gfconsole.frame
if IsValid(frame) then
print(frame)
frame.panel:UpdateToolBarVisibility()
end
end)
Expand Down
31 changes: 18 additions & 13 deletions lua/gfconsole/core/derma/cl_header.lua
Original file line number Diff line number Diff line change
Expand Up @@ -88,25 +88,30 @@ function PANEL:OnMouseReleased(code)
end
end

function PANEL:Think()
local curtime = CurTime()
do
local CurTime = CurTime
local Round = math.Round

self:UpdateCollected()
function PANEL:Think()
local curtime = CurTime()

if (self.next_update or 0) <= curtime then
self.fps:SetText(math.Round(get_average(self.collected.fps)))
self.fps:SizeToContentsX()
self:UpdateCollected()

self.ping:SetText(math.Round(get_average(self.collected.ping)) .. "ms")
self.ping:SizeToContentsX()
if (self.next_update or 0) <= curtime then
self.fps:SetText(Round(get_average(self.collected.fps)))
self.fps:SizeToContentsX()

self:ResetCollected()
self.ping:SetText(Round(get_average(self.collected.ping)) .. "ms")
self.ping:SizeToContentsX()

self.next_update = curtime + .8
end
self:ResetCollected()

self.next_update = curtime + .8
end

if gfconsole.holding then
self:MoveController()
if gfconsole.holding then
self:MoveController()
end
end
end

Expand Down

0 comments on commit e05c575

Please sign in to comment.