From ae4efe0ccf0a2ebce0e015b03adafd637e82cfd6 Mon Sep 17 00:00:00 2001 From: terencehill Date: Thu, 27 May 2021 18:22:20 +0200 Subject: [PATCH] Menu: fix clear button playing a sound on click even if it's hidden (with menu sounds enabled) --- qcsrc/menu/item/inputbox.qc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qcsrc/menu/item/inputbox.qc b/qcsrc/menu/item/inputbox.qc index 94f8934a5..30c325ca4 100644 --- a/qcsrc/menu/item/inputbox.qc +++ b/qcsrc/menu/item/inputbox.qc @@ -28,6 +28,8 @@ float over_ClearButton(entity me, vector pos) { + if (me.text == "") + return 0; if (pos.x >= 1 + me.cb_offset - me.cb_width) if (pos.x < 1 + me.cb_offset) if (pos.y >= 0) -- 2.39.2