Skip to content

Commit 96a6bbf

Browse files
authored
Merge pull request #456 from Aspect12/master
Update chatbox hiding logic.
2 parents 4144fc5 + efa098c commit 96a6bbf

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

plugins/chatbox/derma/cl_chatbox.lua

-7
Original file line numberDiff line numberDiff line change
@@ -1078,13 +1078,6 @@ function PANEL:Think()
10781078
return
10791079
end
10801080

1081-
if (gui.IsGameUIVisible()) then
1082-
self:SetActive(false)
1083-
gui.HideGameUI()
1084-
1085-
return
1086-
end
1087-
10881081
local mouseX = math.Clamp(gui.MouseX(), 0, ScrW())
10891082
local mouseY = math.Clamp(gui.MouseY(), 0, ScrH())
10901083

plugins/chatbox/sh_plugin.lua

+10
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,16 @@ if (CLIENT) then
9797
end
9898
end
9999

100+
function PLUGIN:OnPauseMenuShow()
101+
if (!IsValid(ix.gui.chat) or !ix.gui.chat:GetActive()) then
102+
return
103+
end
104+
105+
ix.gui.chat:SetActive(false)
106+
107+
return false
108+
end
109+
100110
function PLUGIN:HUDShouldDraw(element)
101111
if (element == "CHudChat") then
102112
return false

0 commit comments

Comments
 (0)