From b21ac340a87b14ce04e08650f4f47807c52c66db 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 9b39846b..6a092db4 100644 --- a/src/gui/GuiButton.hx +++ b/src/gui/GuiButton.hx @@ -102,7 +102,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)); } }