Self Made Spincontrolex Question
#1
Okay, essentially I wrote my own spincontrolex from scratch, and it works fine for what I use it for.

The current issue with it being that it only works because in changing the background image I also wanted to reload the skin. Without the skin reload it does not refresh the control and keeps the initial include rather than updating to the new one. Essentially it leaves the buttons going "up is purple" "down is green" even when the string has changed to either purple or green. Only on refreshing the entire page do the up and down actions change.

I was looking to use a similar control elsewhere in my skin, without reloading the screen. Can anyone see a way to make this work without reloading the skin or screen? I was originally thinking some way to force control 101 and 102 to refresh, but cannot find a command that does that. Thanks in advance for any help.

Code:
<includes>
    <include name="BGSpinPurple">
        <onclick>Skin.SetString(BGLabel,Purple)</onclick>
        <onclick>Skin.SetString(BGColor,purple)</onclick>
    </include>
    <include name="BGSpinGreen">
        <onclick>Skin.SetString(BGLabel,Green)</onclick>
        <onclick>Skin.SetString(BGColor,green)</onclick>
    </include>
    <include name="BGSpinBlue">
        <onclick>Skin.SetString(BGLabel,Blue)</onclick>
        <onclick>Skin.SetString(BGColor,blue)</onclick>
    </include>
    <include name="BGSpinRed">
        <onclick>Skin.SetString(BGLabel,Red)</onclick>
        <onclick>Skin.SetString(BGColor,red)</onclick>
    </include>
    <include name="BGSpinYellow">
        <onclick>Skin.SetString(BGLabel,Yellow)</onclick>
        <onclick>Skin.SetString(BGColor,yellow)</onclick>
    </include>
    <include name="BGSpinOrange">
        <onclick>Skin.SetString(BGLabel,Orange)</onclick>
        <onclick>Skin.SetString(BGColor,orange)</onclick>
    </include>
    <include name="BGSpinGrey">
        <onclick>Skin.SetString(BGLabel,Grey)</onclick>
        <onclick>Skin.SetString(BGColor,grey)</onclick>
    </include>


    <include name="SettingsLoadUp">
        <defaultcontrol always="true">102</defaultcontrol>
    </include>
    <include name="SettingsLoadDown">
        <defaultcontrol always="true">101</defaultcontrol>
    </include>
    <include name="NoBGLabel">
        <label>Purple</label>
    </include>

    <include name="BGSpin">
        <control type="group" id="15">
            <posx>235</posx>
            <posy>15</posy>
            <control type="group">
                <control type="button" id="103">
                    <description>Spin Backup</description>
                    <posx>-220</posx>
                    <posy>-10</posy>
                    <width>320</width>
                    <height>30</height>
                    <texturefocus>-</texturefocus>
                    <texturenofocus>-</texturenofocus>
                    <include condition="Skin.String(BGColor,purple) | Skin.String(BGColor,)">BGSpinBlue</include>
                    <include condition="Skin.String(BGColor,blue)">BGSpinGreen</include>
                    <include condition="Skin.String(BGColor,green)">BGSpinYellow</include>
                    <include condition="Skin.String(BGColor,yellow)">BGSpinOrange</include>
                    <include condition="Skin.String(BGColor,orange)">BGSpinRed</include>
                    <include condition="Skin.String(BGColor,red)">BGSpinGrey</include>
                    <include condition="Skin.String(BGColor,grey)">BGSpinPurple</include>
                    <onclick>Skin.SetString(LoadedDown,yes)</onclick>
                    <onclick>ReloadSkin()</onclick>
                </control>

                <control type="button" id="101">
                    <description>Spin Down</description>
                    <posx>100</posx>
                    <posy>0</posy>
                    <width>18</width>
                    <height>10</height>
                    <onleft>102</onleft>
                    <onright>102</onright>
                    <onup>9</onup>
                    <ondown>-</ondown>
                    <texturefocus>arrow-scroll-down-focus.png</texturefocus>
                    <texturenofocus>arrow-scroll-down-nofocus.png</texturenofocus>
                    <include condition="Skin.String(BGColor,purple) | Skin.String(BGColor,)">BGSpinBlue</include>
                    <include condition="Skin.String(BGColor,blue)">BGSpinGreen</include>
                    <include condition="Skin.String(BGColor,green)">BGSpinYellow</include>
                    <include condition="Skin.String(BGColor,yellow)">BGSpinOrange</include>
                    <include condition="Skin.String(BGColor,orange)">BGSpinRed</include>
                    <include condition="Skin.String(BGColor,red)">BGSpinGrey</include>
                    <include condition="Skin.String(BGColor,grey)">BGSpinPurple</include>
                    <onclick>Skin.SetString(LoadedDown,yes)</onclick>
                    <onclick>ReloadSkin()</onclick>
                </control>

                <control type="button" id="102">
                    <description>Spin Up</description>
                    <posx>118</posx>
                    <posy>0</posy>
                    <width>18</width>
                    <height>10</height>
                    <onleft>101</onleft>
                    <onright>101</onright>
                    <onup>9</onup>
                    <ondown>-</ondown>
                    <texturefocus flipx="true">arrow-scroll-up-focus.png</texturefocus>
                    <texturenofocus flipx="true">arrow-scroll-up-nofocus.png</texturenofocus>
                    <include condition="Skin.String(BGColor,purple) | Skin.String(BGColor,)">BGSpinGrey</include>
                    <include condition="Skin.String(BGColor,blue)">BGSpinPurple</include>
                    <include condition="Skin.String(BGColor,green)">BGSpinBlue</include>
                    <include condition="Skin.String(BGColor,yellow)">BGSpinGreen</include>
                    <include condition="Skin.String(BGColor,orange)">BGSpinYellow</include>
                    <include condition="Skin.String(BGColor,red)">BGSpinOrange</include>
                    <include condition="Skin.String(BGColor,grey)">BGSpinRed</include>
                    <onclick>Skin.Reset(LoadedDown)</onclick>
                    <onclick>ReloadSkin()</onclick>
                </control>

                <control type="label">
                    <font>ButtonFont</font>
                    <posx>80</posx>
                    <posy>-13</posy>
                    <width>250</width>
                    <visible>true</visible>
                    <align>right</align>
                    <include condition="Skin.String(BGColor,)">NoBGLabel</include>
                    <label>$INFO[Skin.String(BGLabel)]</label>
                </control>

                <control type="label">
                    <font>ButtonFont</font>
                    <posy>-13</posy>
                    <posx>-200</posx>
                    <label>Background Color</label>
                </control>
            </control>

        </control>

    </include>
</includes>
Reply
#2
create a button for each color and use visibility conditions, not includes. should work then.
visibility condition should look like <visible allowohiddenfocus="true">StringCompare(Skin.String(BGColor),purple)</visible>
and then <onclick>Skin.SetString(...)</onclick> and <onclick>SetFocus(xy)</onclick>
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply

Logout Mark Read Team Forum Stats Members Help
Self Made Spincontrolex Question0