Add option to disable sound on GUI-buttons
Add option to disable sound on GUI-buttons
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
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
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
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.