Select a skins colour theme.
#1
Is there any way to change the skins colour theme, like an <onclick>SetColorTheme(blue)</onclick> kind of function?

I can't see any sort of function in the wiki.

I'd like on first start up of my skin to present the user with the various colour themes and let them choose one.

Any ideas?

Thanks
Reply
#2
(2021-08-05, 20:20)roidy Wrote: Is there any way to change the skins colour theme, like an <onclick>SetColorTheme(blue)</onclick> kind of function?

I can't see any sort of function in the wiki.

I'd like on first start up of my skin to present the user with the various colour themes and let them choose one.

Any ideas?

Thanks
@roidy , I use script.embuary.helper for this.  In the Colors section of the skin settings, I have a button that presents the user with a select dialog with the various color themes so that they can choose one.  Here is the code:

xml:

<control type="button" id="91080">
      <width>1350</width>
      <height>60</height>
      <texturenofocus />
      <textoffsetx>30</textoffsetx>
      <onclick>SetProperty(Dialog.1.Label,$LOCALIZE[571])</onclick>
  <onclick>SetProperty(Dialog.1.BuiltIn,RunScript(script.embuary.helper,action=setkodisetting,setting=lookandfeel.skincolors,value=SKINDEFAULT)||Skin.SetString(HighlightColorStr,None)||Skin.SetString(LabelTextColorStr,None)||Skin.SetString(FocusedTextColorStr,None)||Skin.SetString(SelectedTextColorStr,None))</onclick>
      <onclick>SetProperty(Dialog.2.Label,Blue)</onclick>
                        <onclick>SetProperty(Dialog.2.BuiltIn,RunScript(script.embuary.helper,action=setkodisetting,setting=lookandfeel.skincolors,value=Blue)||Skin.SetString(HighlightColorStr,None)||Skin.SetString(LabelTextColorStr,None)||Skin.SetString(FocusedTextColorStr,None)||Skin.SetString(SelectedTextColorStr,None))</onclick>
      <onclick>SetProperty(Dialog.3.Label,Green)</onclick>
                        <onclick>SetProperty(Dialog.3.BuiltIn,RunScript(script.embuary.helper,action=setkodisetting,setting=lookandfeel.skincolors,value=Green)||Skin.SetString(HighlightColorStr,None)||Skin.SetString(LabelTextColorStr,None)||Skin.SetString(FocusedTextColorStr,None)||Skin.SetString(SelectedTextColorStr,None))</onclick>
      <onclick>SetProperty(Dialog.4.Label,White)</onclick>
                        <onclick>SetProperty(Dialog.4.BuiltIn,RunScript(script.embuary.helper,action=setkodisetting,setting=lookandfeel.skincolors,value=White)||Skin.SetString(HighlightColorStr,None)||Skin.SetString(LabelTextColorStr,None)||Skin.SetString(FocusedTextColorStr,None)||Skin.SetString(SelectedTextColorStr,None))</onclick>
      <onclick>RunScript(script.embuary.helper,action=createselect,header=$LOCALIZE[15111])</onclick>
      <label>$LOCALIZE[32210]</label>
      <label2>$VAR[SkinColorTheme]</label2>
      <visible>Skin.HasSetting(Enable.EmbuaryHelper)</visible>
</control>

As you can see, I am using the setkodisetting function of embuary helper to set the lookandfeel.skincolors Kodi setting, and I am also using embuary helper to build and show the select dialog itself.  That function is explained here: https://github.com/sualfred/script.embua...ect-dialog

I hope this is useful to you.

Regards,

Bart
Amber Maintainer
Main HTPC: Intel Core i7, 32GB, nVidia GTX1080, Windows 11 Soundbar: Samsung HW-Q950A TV: LG CX Kodi: 19.3 Skin: Amber
Reply
#3
(2021-08-05, 22:29)bsoriano Wrote: @roidy , I use script.embuary.helper for this.  In the Colors section of the skin settings, I have a button that presents the user with a select dialog with the various color themes so that they can choose one.  Here is the code:

Perfect, Thanks.
Reply

Logout Mark Read Team Forum Stats Members Help
Select a skins colour theme.0