help with adding settings to a skin
#1
i am trying to add radio buttons to the SkinSettings.xml to enable/disable the visibility of the following in DialogVideoInfo.xml, but i am unsure what or how to reference to it.

 
xml:
           <!-- Play Button File Path -->
            <control type="fadelabel">
                <left>10</left>
                <bottom>7</bottom>
                <width>1900</width>
                <height>36</height>
                <font>Font27</font>
                <align>center</align>
                <label>$INFO[ListItem.FileNameAndPath]</label>
                <textcolor>$VAR[TextColor2]</textcolor>
                <pauseatend>3000</pauseatend>
                <visible>Control.HasFocus(8)</visible>
            </control>

            
            <!-- Trailer Button File Path -->
            <control type="fadelabel">
                <left>8</left>
                <bottom>7</bottom>
                <width>1902</width>
                <height>36</height>
                <font>Font27</font>
                <align>center</align>
                <label>$INFO[ListItem.Trailer]</label>
                <textcolor>$VAR[TextColor2]</textcolor>
                <pauseatend>3000</pauseatend>
                <visible>Control.HasFocus(11)</visible>
            </control>
Reply
#2
for this example infobutton22
SkinSettings.xml 
<control type="radiobutton" id="663">
                    <label> infobutton22</label>
                    <include>DefaultSettingButton</include>
                    <selected>!Skin.HasSetting(infobutton22)</selected>
                    <onclick>Skin.ToggleSetting(infobutton22)</onclick>
                </control>


DialogVideoInfo.xml
<visible>Control.HasFocus(8) | !Skin.HasSetting(infobutton22)</visible>
Reply
#3
(2019-11-27, 13:05)the_other_guy Wrote: for this example infobutton22
SkinSettings.xml 
<control type="radiobutton" id="663">
                    <label> infobutton22</label>
                    <include>DefaultSettingButton</include>
                    <selected>!Skin.HasSetting(infobutton22)</selected>
                    <onclick>Skin.ToggleSetting(infobutton22)</onclick>
                </control>


DialogVideoInfo.xml
<visible>Control.HasFocus(8) | !Skin.HasSetting(infobutton22)</visible>
ok, i think i get it. so i added this to DialogVideoInfo.xml

xml:
                       <!-- Play Button File Path -->
            <control type="fadelabel">
                <left>10</left>
                <bottom>7</bottom>
                <width>1900</width>
                <height>36</height>
                <font>Font27</font>
                <align>center</align>
                <label>$INFO[ListItem.FileNameAndPath]</label>
                <textcolor>$VAR[TextColor2]</textcolor>
                <pauseatend>3000</pauseatend>
                <visible>Control.HasFocus(8) | !Skin.HasSetting(VideoPath)</visible>
            </control>


and this to the SkinSettings.xml

xml:
<!-- Movie/TV Show Path Setting -->
<control type="radiobutton" id="304">
    <width>1220</width>
    <height>66</height>
    <textwidth>1120</textwidth>
    <font>Font33</font>
    <label>$LOCALIZE[31133]</label>
    <include>DefaultSettingButton</include>
    <selected>!Skin.HasSetting(VideoPath)</selected>
    <onclick>Skin.ToggleSetting(VideoPath)</onclick>
</control>

but it does not work correctly, if the box is unticked in settings the filename and path show up as normal, if i tick the box there is additional text on top of the filename andPath but i can't make it out

UPDATE: fixed the issue by changing:
xml:
<visible>Control.HasFocus(8) | !Skin.HasSetting(VideoPath)</visible>

to

xml:
<visible>Control.HasFocus(8) + !Skin.HasSetting(VideoPath)</visible>
Reply
#4
(2019-11-27, 13:05)the_other_guy Wrote: for this example infobutton22
SkinSettings.xml 
<control type="radiobutton" id="663">
                    <label> infobutton22</label>
                    <include>DefaultSettingButton</include>
                    <selected>!Skin.HasSetting(infobutton22)</selected>
                    <onclick>Skin.ToggleSetting(infobutton22)</onclick>
                </control>


DialogVideoInfo.xml
<visible>Control.HasFocus(8) | !Skin.HasSetting(infobutton22)</visible>

Thank you very much!
Reply
#5
second question:

how do i show a alternative label if the setting is not ticked?

IE:
DialogVideoInfo.xml

xml:
<!-- Refresh Button File Path -->
<control type="fadelabel">
    <left>8</left>
    <bottom>7</bottom>
    <width>1902</width>
    <height>36</height>
    <font>Font27</font>
    <align>center</align>
    <label>$INFO[ListItem.FileNameAndPath]</label>
    <textcolor>$VAR[TextColor2]</textcolor>
    <pauseatend>3000</pauseatend>
    <visible>Control.HasFocus(6) + !Skin.HasSetting(VideoRefreshPath)</visible>
</control>

SkinSettings.xml

xml:
<!-- Show Refresh Path -->
<control type="radiobutton" id="306">
    <width>1220</width>
    <height>66</height>
    <textwidth>1120</textwidth>
    <font>Font33</font>
    <label>$LOCALIZE[31135]</label>
    <include>DefaultSettingButton</include>
    <selected>!Skin.HasSetting(VideoRefreshPath)</selected>
    <onclick>Skin.ToggleSetting(VideoRefreshPath)</onclick>
</control>

when ticked will display Path and File Name, when unticked i would like to display a Label "Refresh MetaSata for $INFO[ListItem.Title]"
Reply
#6
you can use a variable for that: https://kodi.wiki/view/Skinning_Manual#Variables
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#7
an example

<control type="radiobutton" id="708">
                    <label>High Contrast</label>
                    <include>DefaultSettingButton</include>
                    <onclick>Skin.ToggleSetting(High_Contrast)</onclick>
                    <selected>!Skin.HasSetting(High_Contrast)</selected>
                </control>
<control type="image">
                        <top>-320</top>
                        <left>-130</left>
                        <width>110%</width>
                        <height>1080</height>
                            <texture colordiffuse="75FFFFFF">colors/black.png</texture>
                        <visible>Skin.HasSetting(High_Contrast)</visible>
                    </control>
                    <control type="image">
                        <bottom>100</bottom>
                        <left>-130</left>
                        <width>110%</width>
                        <height>130</height>
                        <texture colordiffuse="45FFFFFF">colors/black.png</texture>
                        <visible>!Skin.HasSetting(High_Contrast)</visible>
                    </control>
  2  <control type="label">
 <visible>!</visible>
<visible></visible>
Reply
#8
(2019-11-29, 02:01)the_other_guy Wrote: an example

<control type="radiobutton" id="708">
                    <label>High Contrast</label>
                    <include>DefaultSettingButton</include>
                    <onclick>Skin.ToggleSetting(High_Contrast)</onclick>
                    <selected>!Skin.HasSetting(High_Contrast)</selected>
                </control>
<control type="image">
                        <top>-320</top>
                        <left>-130</left>
                        <width>110%</width>
                        <height>1080</height>
                            <texture colordiffuse="75FFFFFF">colors/black.png</texture>
                        <visible>Skin.HasSetting(High_Contrast)</visible>
                    </control>
                    <control type="image">
                        <bottom>100</bottom>
                        <left>-130</left>
                        <width>110%</width>
                        <height>130</height>
                        <texture colordiffuse="45FFFFFF">colors/black.png</texture>
                        <visible>!Skin.HasSetting(High_Contrast)</visible>
                    </control>
  2  <control type="label">
 <visible>!</visible>
<visible></visible>
that one i don't quite understand

Especially this part:

xml:
2  <control type="label">
<visible>!</visible>
<visible></visible>
Reply
#9
2 labels 
1 <control type="label">
                            <align>right</align>
                            <label>display Path and File Name</label>
<visible>! ON</visible>
                        </control>

2
<control type="label">
                            <align>right</align>
                            <label>Refresh MetaSata for $INFO[ListItem.Title]</label>
<visible>off</visible>
                        </control>
Reply
#10
(2019-11-30, 01:33)the_other_guy Wrote: 2 labels 
1 <control type="label">
                            <align>right</align>
                            <label>display Path and File Name</label>
<visible>! ON</visible>
                        </control>

2
<control type="label">
                            <align>right</align>
                            <label>Refresh MetaSata for $INFO[ListItem.Title]</label>
<visible>off</visible>
                        </control>

?

on and off do not work
Reply
#11
<! this is on?>
< this off ?> 
you add the same line and only 1 has ! toggle switch
<!Skin.HasSetting(VideoRefreshPath)>
<Skin.HasSetting(VideoRefreshPath)>
Reply
#12
(2019-12-01, 04:12)the_other_guy Wrote: <! this is on?>
< this off ?> 
you add the same line and only 1 has ! toggle switch
<!Skin.HasSetting(VideoRefreshPath)>
<Skin.HasSetting(VideoRefreshPath)>

i really appreciate you help, but i am totally confused.

like i said this is my first attempt at skinning.
Reply

Logout Mark Read Team Forum Stats Members Help
help with adding settings to a skin0