From ef546d375a3a476b779259eb2b7c11d544a8e730 Mon Sep 17 00:00:00 2001 From: RandomityGuy <31925790+RandomityGuy@users.noreply.github.com> Date: Mon, 19 Dec 2022 19:11:10 +0530 Subject: [PATCH] disabled buttons don't have hover sounds --- src/gui/GuiButton.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/GuiButton.hx b/src/gui/GuiButton.hx index 7da736f8..00669fe6 100644 --- a/src/gui/GuiButton.hx +++ b/src/gui/GuiButton.hx @@ -93,7 +93,7 @@ class GuiButton extends GuiAnim { public override function onMouseEnter(mouseState:MouseState) { super.onMouseEnter(mouseState); - if (buttonSounds) { + if (buttonSounds && !disabled) { AudioManager.playSound(ResourceLoader.getResource("data/sound/buttonover.wav", ResourceLoader.getAudio, this.soundResources)); } }