From 0186db45dc96a0dd45058b259e2f38f5468d3ce6 Mon Sep 17 00:00:00 2001 From: terencehill Date: Tue, 28 Dec 2021 15:11:20 +0100 Subject: [PATCH] Menu: fix Apply buttons not working if a button is pressed with the spacebar --- qcsrc/menu/item/button.qc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/qcsrc/menu/item/button.qc b/qcsrc/menu/item/button.qc index 77e4ccad2..e9f418ad9 100644 --- a/qcsrc/menu/item/button.qc +++ b/qcsrc/menu/item/button.qc @@ -121,8 +121,14 @@ if (me.clickTime > 0 && me.clickTime <= frametime) { // keyboard click timer expired? Fire the event then. - if (!me.disabled) - if (me.onClick) me.onClick(me, me.onClickEntity); + if (!me.disabled && me.onClick) + { + if(me.applyButton) + me.applyButton.disabled = false; + me.onClick(me, me.onClickEntity); + if(me.disableOnClick) + me.disabled = true; + } } me.clickTime -= frametime; -- 2.39.2