mirror of
https://github.com/Earu/EasyChat.git
synced 2025-03-04 03:13:20 -05:00
Hiding game menu by hook OnPauseMenuShow (#125)
This commit is contained in:
parent
36d6e843b5
commit
268e5e46e0
@ -2677,19 +2677,16 @@ if CLIENT then
|
||||
end
|
||||
end)
|
||||
|
||||
hook.Add("PreRender", TAG, function()
|
||||
if not input.IsKeyDown(KEY_ESCAPE) then return end
|
||||
hook.Add("OnPauseMenuShow", TAG, function()
|
||||
if IsValid(EasyChat.Settings) and EasyChat.Settings:IsVisible() then
|
||||
EasyChat.Settings:SetVisible(false)
|
||||
return false
|
||||
end
|
||||
|
||||
-- handle settings menu if opened, stop there for now
|
||||
if IsValid(EasyChat.Settings) and EasyChat.Settings:IsVisible() then
|
||||
EasyChat.Settings:SetVisible(false)
|
||||
return
|
||||
end
|
||||
|
||||
if EasyChat.IsOpened() then
|
||||
close_chatbox()
|
||||
gui.HideGameUI()
|
||||
end
|
||||
if EasyChat.IsOpened() then
|
||||
close_chatbox()
|
||||
return false
|
||||
end
|
||||
end)
|
||||
|
||||
hook.Add("GUIMousePressed", TAG, function(mouse_code)
|
||||
|
Loading…
Reference in New Issue
Block a user