<?xml version="1.0" encoding="UTF-8"?>
<window id="0">
    <defaultcontrol always="true">200</defaultcontrol>

    <controls>
        <include content="GlobalBackground" />

        <include content="ButtonForValues">
            <param name="buttonid" value="200" />
            <param name="controlid" value="210" />
        </include>
<!--
        <control type="button" id="200">
            <description>Skin Settings Initialisation</description>
            <visible>!Skin.HasSetting(RevolveConfiguration) + String.IsEmpty(Skin.String(Revolve.Configuration))</visible>
            <texturenofocus>-</texturenofocus>
            <texturefocus>-</texturefocus>
            <include content="DefaultSettingsForValues" />
            <onfocus>SetFocus(210)</onfocus>
        </control>

        <control type="button" id="200">
            <description>Skin Settings Migration</description>
            <visible>[Skin.HasSetting(RevolveConfiguration) | StringCompare(Skin.String(Revolve.Configuration),3.0.2)] + !StringCompare(Skin.String(Revolve.Configuration),4.1.1)</visible>
            <texturenofocus>-</texturenofocus>
            <texturefocus>-</texturefocus>
            <include content="MigratedValues" />
            <onfocus>SetFocus(210)</onfocus>
        </control>

        <control type="button" id="200">
            <description>Skin Settings Evasion</description>
            <visible>StringCompare(Skin.String(Revolve.Configuration),4.1.1)</visible>
            <texturenofocus>-</texturenofocus>
            <texturefocus>-</texturefocus>
            <onfocus>SetFocus(210)</onfocus>
        </control>
-->
        <control type="button" id="210">
            <description>Script and Plugin Initialisation</description>
            <texturenofocus>-</texturenofocus>
            <texturefocus>-</texturefocus>
            <onfocus condition="System.HasAddon(script.favourites)">RunScript(script.favourites)</onfocus>
            <onfocus>SetFocus(220)</onfocus>
        </control>

        <control type="button" id="220">
            <description>Circle Item Initialisation</description>
            <texturenofocus>-</texturenofocus>
            <texturefocus>-</texturefocus>
            <onfocus>RunScript(script.revolve.service,PopulateStaticItemsFromHomeProperties,$INFO[Skin.String(CircleMovieOption.Source)],CircleMovie%02dOption,0)</onfocus>
            <onfocus>RunScript(script.revolve.service,PopulateStaticItemsFromHomeProperties,$INFO[Skin.String(CircleEpisodeOption.Source)],CircleEpisode%02dOption,0)</onfocus>
            <onfocus>RunScript(script.revolve.service,PopulateStaticItemsFromHomeProperties,$INFO[Skin.String(CircleAlbumOption.Source)],CircleAlbum%02dOption,0)</onfocus>
            <onfocus>SetFocus(300)</onfocus>
        </control>

        <include content="RssFeed" />

        <control type="wraplist" id="300">
            <description>Invisible Home Wraplist</description>
            <visible allowhiddenfocus="true">Skin.HasSetting(Debug.ListBorder.Visible)</visible>
            <posx>0</posx>
            <posy>0</posy>
            <width>1920</width>
            <height>1080</height>
            <focusposition>4</focusposition>
            <defaultcontrol>8</defaultcontrol>
            <onup>300</onup>
            <ondown>300</ondown>
            <onleft condition="[Container(300).HasFocus(5) + !String.IsEmpty(Skin.String(CircleMovieOption.Source))] | [Container(300).HasFocus(6) + !String.IsEmpty(Skin.String(CircleEpisodeOption.Source))] | [Container(300).HasFocus(15) + System.HasAddon(script.tv.show.next.aired) + Skin.HasSetting(CircleNextAired.Enable)] | [Container(300).HasFocus(16) + !String.IsEmpty(Skin.String(CircleAlbumOption.Source))]">600</onleft>
            <onleft condition="Container(300).HasFocus(20) + Skin.HasSetting(CircleExitMenu.Enable)">900</onleft>
            <onright>Noop</onright>

            <include content="InvisibleVerticalListItemsForMenu" />
            <include content="HomeMenuItems" />
        </control>
        
        <include content="BackgroundAnimationForHomeRevolveList" />
        <include content="ListForHomeRevolveList" />
        <include content="RingForHomeRevolveList" />

        <control type="group">
            <animation effect="fade" start="0" end="100" time="500" reversible="false">WindowOpen</animation>
            <animation effect="fade" delay="500" start="100" end="0" time="500" reversible="false">WindowClose</animation>
            
            <control type="group">
                <visible>System.GetBool(lookandfeel.enablerssfeeds)</visible>
                <include content="BigClock">
                    <param name="posy" value="50" />
                </include>
            </control>
            <control type="group">
                <visible>!System.GetBool(lookandfeel.enablerssfeeds)</visible>
                <include content="BigClock" />
            </control>
        </control>
        
        <include content="GlobalOverlay" />
        <include content="BusyDialogForSkinSettings" />
    </controls>
</window>
