disabled buttons don't have hover sounds

This commit is contained in:
RandomityGuy 2022-12-19 19:11:10 +05:30
parent affbceda51
commit b21ac340a8

View file

@ -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));
}
}