From: terencehill Date: Thu, 27 May 2021 16:22:20 +0000 (+0200) Subject: Menu: fix clear button playing a sound on click even if it's hidden (with menu sounds... X-Git-Tag: xonotic-v0.8.5~405^2~25 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ae4efe0ccf0a2ebce0e015b03adafd637e82cfd6;p=xonotic%2Fxonotic-data.pk3dir.git Menu: fix clear button playing a sound on click even if it's hidden (with menu sounds enabled) --- 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)