<?xml version="1.0" encoding="utf-8"?>
<window>
    <defaultcontrol always="true">10</defaultcontrol>
    <onload>AlarmClock(StartupDelay,SetFocus(12),$VAR[StartupDelay],silent)</onload>
    <animation effect="fade" time="800">WindowOpen</animation>
    <animation effect="fade" time="200">WindowClose</animation>
    <controls>
        <control type="button" id="10">
            <include>HiddenButton</include>
        </control>
        <control type="button" id="12">
            <include>HiddenButton</include>
            <!-- Play PlayList or Custom Video -->
            <onfocus condition="String.IsEqual(Skin.String(startup-screentype),video)+!String.IsEmpty(Skin.String(startup-videopath))">PlayMedia($ESCINFO[Skin.String(startup-videopath)])</onfocus>
            <onfocus condition="Skin.HasSetting(startup-playlist)+!String.IsEmpty(Skin.String(startup-musicplaylistpath))">PlayMedia($ESCINFO[Skin.String(startup-musicplaylistpath)],isdir)</onfocus>
            <onfocus condition="Skin.HasSetting(startup-playlist)+!String.IsEmpty(Skin.String(startup-videoplaylistpath))">PlayMedia($ESCINFO[Skin.String(startup-videoplaylistpath)],isdir)</onfocus>
            <!--Change Window-->
            <onfocus condition="!String.IsEmpty(Skin.String(CustomStartup.Path))">$INFO[Skin.String(CustomStartup.Path)]</onfocus>
            <onfocus condition="String.IsEmpty(Skin.String(CustomStartup.Path))+String.IsEmpty(Skin.String(StartupWindow))">ReplaceWindow($INFO[System.StartupWindow])</onfocus>
            <onfocus condition="String.IsEmpty(Skin.String(CustomStartup.Path))+!String.IsEmpty(Skin.String(StartupWindow))+String.IsEmpty(Skin.String(StartupWindowOption))">ReplaceWindow($INFO[Skin.String(StartupWindow)])</onfocus>
            <onfocus condition="String.IsEmpty(Skin.String(CustomStartup.Path))+!String.IsEmpty(Skin.String(StartupWindow))+!String.IsEmpty(Skin.String(StartupWindowOption))">ReplaceWindow($INFO[Skin.String(StartupWindow)],$INFO[Skin.String(StartupWindowOption)])</onfocus>
        </control>
        <include>Fanart_Art</include>
        <!--CUSTOM STARTUP IMAGE-->
        <control type="image">
            <visible>String.IsEqual(Skin.String(startup-screentype),image)+!String.IsEmpty(Skin.String(startup-imagepath))</visible>
            <include>KenBurns</include>
            <posx>0</posx>
            <posy>0</posy>
            <width>1920</width>
            <height>1080</height>
            <aspectratio>scale</aspectratio>
            <texture>$INFO[Skin.String(startup-imagepath)]</texture>
        </control>
        <control type="multiimage">
            <visible>String.IsEqual(Skin.String(startup-screentype),multiimage)+!String.IsEmpty(Skin.String(startup-multiimagepath))</visible>
            <include>KenBurns</include>
            <posx>0</posx>
            <posy>0</posy>
            <width>1920</width>
            <height>1080</height>
            <timeperimage>2000</timeperimage>
            <randomize>true</randomize>
            <fadetime>300</fadetime>
            <aspectratio aligny="top">scale</aspectratio>
            <imagepath background="true">$INFO[Skin.String(startup-multiimagepath)]</imagepath>
        </control>
        <control type="image">
            <visible>Skin.HasSetting(BlackGlassMode)</visible>
            <posx>0</posx>
            <posy>0</posy>
            <width>1920</width>
            <height>1080</height>
            <include>BgOverlayFanart</include>
            <include>OverlayBG</include>
        </control>
        <control type="group">
            <visible>![String.IsEqual(Skin.String(startup-screentype),image)+!String.IsEmpty(Skin.String(startup-imagepath))] +
                ![String.IsEqual(Skin.String(startup-screentype),multiimage)+!String.IsEmpty(Skin.String(startup-multiimagepath))]</visible>
            <include>VisibleFadeEffect</include>
            <control type="image">
                <visible>!Skin.HasSetting(BlackGlassMode)</visible>
                <posx>0</posx>
                <posy>-3</posy>
                <texture border="10">common/basichome_upper_gradient.png</texture>
                <width>1920</width>
                <height>240</height>
            </control>
            <control type="image">
                <visible>!Skin.HasSetting(BlackGlassMode)</visible>
                <posx>606</posx>
                <posy>308</posy>
                <width>707</width>
                <height>464</height>
                <texture>startup.png</texture>
            </control>
            <control type="image">
                <visible>Skin.HasSetting(BlackGlassMode)</visible>
                <posx>702</posx>
                <posy>308</posy>
                <width>515</width>
                <height>464</height>
                <texture>startup2.png</texture>
            </control>
            <control type="label">
                <posx>55r</posx>
                <posy>1010</posy>
                <height>36</height>
                <width>1173</width>
                <align>right</align>
                <font>WindowTitleSubFont</font>
                <textcolor>AlternateColor</textcolor>
                <label>by Tgx</label>
            </control>
            <control type="label">
                <visible>System.HasAddon(script.skin.helper.service)</visible>
                <posx>55</posx>
                <posy>1010</posy>
                <height>36</height>
                <width>1173</width>
                <font>WindowTitleSubFont</font>
                <textcolor>AlternateColor</textcolor>
                <label>$INFO[Window(Home).Property(SkinHelper.skinVersion)]</label>
            </control>
        </control>
    </controls>
</window>
