From 8b378735faeedfcac884c4b2db6b67f50aacb1b2 Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Fri, 17 Feb 2023 14:23:07 -0800 Subject: [PATCH] don't fire HotkeyLabel if the label is disabled --- library/lua/gui/widgets.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/lua/gui/widgets.lua b/library/lua/gui/widgets.lua index 3ef27a651..9fbae2cee 100644 --- a/library/lua/gui/widgets.lua +++ b/library/lua/gui/widgets.lua @@ -1472,7 +1472,8 @@ end function HotkeyLabel:onInput(keys) if HotkeyLabel.super.onInput(self, keys) then return true - elseif keys._MOUSE_L_DOWN and self:getMousePos() and self.on_activate then + elseif keys._MOUSE_L_DOWN and self:getMousePos() and self.on_activate + and not is_disabled(self) then self.on_activate() return true end