Kodi Community Forum

Full Version: Change Default GUI Sounds In New Skin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am working on a Mario Galaxy theme for Kodi 18 (Aeon-Nox Sylvo type). I have the skin working fine. I also created some gui sounds to go with it and made them as a separate add-on. I have it all working, I even have the skin downloading the gui sounds as a dependency, but I can't figure out how to have them used as the default gui sounds when the skin is installed.

Any help would be much appreciated.
Use my helper script.

Code:

<onload condition="!Skin.HasSetting(setdefaultsound)">RunScript(script.embuary.helper,action=setkodisetting,setting=lookandfeel.soundskin,value=resource.uisounds.MYUISOUNDS)</onload>
<onload condition="!Skin.HasSetting(setdefaultsound)">Skin.ToggleSetting(setdefaultsound)</onload>

Edit:
But be aware. UI sounds is a global setting. You should never toggle global settings without letting the user know or asking him. So a yes/no dialog is the correct way to go.
(2019-06-20, 15:34)sualfred Wrote: [ -> ]Use my helper script.

Code:

<onload condition="!Skin.HasSetting(setdefaultsound)">RunScript(script.embuary.helper,action=setkodisetting,setting=lookandfeel.soundskin,value=resource.uisounds.MYUISOUNDS)</onload>
<onload condition="!Skin.HasSetting(setdefaultsound)">Skin.ToggleSetting(setdefaultsound)</onload>

Edit:
But be aware. UI sounds is a global setting. You should never toggle global settings without letting the user know or asking him. So a yes/no dialog is the correct way to go.

Thank you, and thank you for the warning, I actually put it in the changelog to enable the sounds if they wished to use them.