]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Menu: fix clear button playing a sound on click even if it's hidden (with menu sounds...
authorterencehill <piuntn@gmail.com>
Thu, 27 May 2021 16:22:20 +0000 (18:22 +0200)
committerterencehill <piuntn@gmail.com>
Thu, 27 May 2021 16:22:20 +0000 (18:22 +0200)
qcsrc/menu/item/inputbox.qc

index 94f8934a5f386423b00f864c896ad95a8e1fa3b7..30c325ca415cacf0c806b81e9dac4806f7545644 100644 (file)
@@ -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)