Page 1 of 1

Add option to disable sound on GUI-buttons

Posted: Wed Feb 27, 2019 9:08 pm
by Therenas
Currently, there seems to be no way to disable the 'click'-sound that a (sprite-)button makes for modders. The base game however does this in many places, as it would become quite annoying otherwise, hearing click-sounds all the time. Now I find myself in a situation where I am implementing views similar to some of the base ones, like a recipe selector for example. So I would like to be able to disable the sounds on some of the buttons, for consistency and a nicer user experience.

Re: Add option to disable sound on GUI-buttons

Posted: Thu Feb 28, 2019 4:45 am
by SyncViews
Can you not define a button style that either has a "silence" sound or zero volume (never tried personally)?

Re: Add option to disable sound on GUI-buttons

Posted: Thu Feb 28, 2019 9:27 pm
by Therenas
Well not that I am aware of? There is no such property in LuaStyle I think.

Re: Add option to disable sound on GUI-buttons

Posted: Tue Mar 12, 2019 10:31 pm
by Therenas
I just found out that, at least in 0.17, you can set style.left_click_sound = {}, which removes the sound, so I guess this can be moved to already exists.