<?xml version="1.0" encoding="UTF-8"?>
<window>
	<defaultcontrol always="true">9000</defaultcontrol>
	<onload condition="String.IsEmpty(Skin.String(FirstRun))">ActivateWindow(1111)</onload>
	<controls>
		<control type="label">
			<posx>-10</posx>
			<posy>-10</posy>
			<width>0</width>
			<height>0</height>
			<label>$INFO[Weather.FanartCode]</label> <!-- trigger weather retrieval -->
		</control>
		<include>CommonBackground</include>
		<control type="group">
			<posx>778r</posx>
			<posy>10</posy>
			<include>Window_OpenClose_Animation</include>
			<animation effect="slide" start="0,0" end="250,0" time="0" condition="String.IsEqual(Skin.AspectRatio,4:3)">Conditional</animation>
			<visible>Library.HasContent(Movies) | Library.HasContent(TVShows) | Library.HasContent(Music) | Integer.IsGreater(Container(2400).NumItems,0)</visible>
			<control type="button">
				<posx>0</posx>
				<posy>120</posy>
				<width>33</width>
				<height>55</height>
				<texturenofocus>arrow_left.png</texturenofocus>
				<texturefocus colordiffuse="blue">arrow_left.png</texturefocus>
				<onclick>Control.Move(9010,-1)</onclick>
			</control>
			<control type="button">
				<posx>333</posx>
				<posy>120</posy>
				<width>33</width>
				<height>55</height>
				<texturenofocus>arrow_right.png</texturenofocus>
				<texturefocus colordiffuse="blue">arrow_right.png</texturefocus>
				<onclick>Control.Move(9010,1)</onclick>
			</control>
			<control type="wraplist" id="9010">
				<include>VisibleFadeEffect</include>
				<posx>83</posx>
				<posy>78</posy>
				<width>200</width>
				<height>140</height>
				<onup>9000</onup>
				<ondown>9002</ondown>
				<scrolltime>0</scrolltime>
				<orientation>Horizontal</orientation>
				<itemlayout width="200" height="140">
					<control type="image">
						<posx>15</posx>
						<posy>15</posy>
						<height>110</height>
						<width>170</width>
						<texture>button_nofocus.png</texture>
						<bordertexture border="6">panel_shadow.png</bordertexture>
						<bordersize>5</bordersize>
					</control>
					<control type="label">
						<posx>5</posx>
						<posy>0</posy>
						<height>140</height>
						<width>190</width>
						<label>$INFO[ListItem.Label]</label>
						<align>center</align>
						<aligny>center</aligny>
						<textcolor>white</textcolor>
						<font>font22</font>
					</control>
				</itemlayout>
				<focusedlayout width="200" height="140">
					<control type="image">
						<posx>15</posx>
						<posy>15</posy>
						<height>110</height>
						<width>170</width>
						<texture>button_nofocus.png</texture>
						<bordertexture border="6">panel_shadow.png</bordertexture>
						<bordersize>5</bordersize>
						<visible>!Control.HasFocus(9010)</visible>
					</control>
					<control type="image">
						<posx>15</posx>
						<posy>15</posy>
						<height>110</height>
						<width>170</width>
						<texture>list_focus.png</texture>
						<bordertexture border="6">panel_shadow.png</bordertexture>
						<bordersize>5</bordersize>
						<visible>Control.HasFocus(9010)</visible>
					</control>
					<control type="label">
						<posx>5</posx>
						<posy>0</posy>
						<height>140</height>
						<width>190</width>
						<label>$INFO[ListItem.Label]</label>
						<align>center</align>
						<aligny>center</aligny>
						<textcolor>white</textcolor>
						<font>font22</font>
					</control>
				</focusedlayout>
				<content>
					<item id="1">
						<label>$LOCALIZE[31011][CR]$LOCALIZE[31013]</label>
						<onclick>Control.Move(9010,1)</onclick>
						<icon></icon>
						<thumb></thumb>
						<visible>Library.HasContent(Movies)</visible>
					</item>
					<item id="2">
						<label>$LOCALIZE[31011][CR]$LOCALIZE[31014]</label>
						<onclick>Control.Move(9010,1)</onclick>
						<icon></icon>
						<thumb></thumb>
						<visible>Library.HasContent(TVShows)</visible>
					</item>
					<item id="3">
						<label>$LOCALIZE[31011][CR]$LOCALIZE[31016]</label>
						<onclick>Control.Move(9010,1)</onclick>
						<icon></icon>
						<thumb></thumb>
						<visible>Library.HasContent(Music)</visible>
					</item>
					<item id="4">
						<label>24001</label>
						<onclick>Control.Move(9010,1)</onclick>
						<icon></icon>
						<thumb></thumb>
						<visible>Integer.IsGreater(Container(2400).NumItems,0)</visible>
					</item>
				</content>
			</control>
		</control>
		<control type="group">
			<animation effect="slide" start="0,0" end="-1040,0" time="400" tween="quadratic" easing="in">WindowClose</animation>
			<animation effect="slide" end="0,0" start="-1040,0" time="400" tween="quadratic" easing="out">WindowOpen</animation>
			<include>HomeMenu</include>
			<control type="panel" id="9002">
				<posx>5</posx>
				<posy>70</posy>
				<animation effect="fade" start="100" end="0" time="300" condition="Window.Next(Home)">WindowClose</animation>
				<animation effect="fade" end="100" start="0" time="300" condition="Window.Previous(Home)">WindowOpen</animation>
				<animation effect="slide" start="0,0" end="60,0" time="0" condition="String.IsEqual(Container(9002).NumItems,3)">conditional</animation>
				<width>900</width>
				<height>120</height>
				<onleft>9002</onleft>
				<onright>9002</onright>
				<onup>9000</onup>
				<ondown>9000</ondown>
				<pagecontrol></pagecontrol>
				<scrolltime>300</scrolltime>
				<orientation>Horizontal</orientation>
				<itemlayout height="120" width="120">
					<control type="image">
						<posx>20</posx>
						<posy>20</posy>
						<width>80</width>
						<height>80</height>
						<bordersize>12</bordersize>
						<texture>$INFO[ListItem.Icon]</texture>
						<aspectratio>keep</aspectratio>
					</control>
				</itemlayout>
				<focusedlayout height="120" width="120">
					<control type="image">
						<posx>0</posx>
						<posy>0</posy>
						<width>120</width>
						<height>120</height>
						<texture colordiffuse="blue">roundbutton-focus.png</texture>
					</control>
					<control type="image">
						<posx>20</posx>
						<posy>20</posy>
						<width>80</width>
						<height>80</height>
						<bordersize>12</bordersize>
						<texture>$INFO[ListItem.Icon]</texture>
						<aspectratio>keep</aspectratio>
					</control>
				</focusedlayout>
				<content>
					<item>
						<label>13012</label>
						<onclick>Shutdown</onclick>
						<icon>icon_button_shutdown.png</icon>
					</item>
					<item>
						<label>20126</label>
						<onclick>System.LogOff</onclick>
						<icon>icon_button_logoff.png</icon>
						<visible>System.HasLoginScreen | Integer.IsGreater(System.ProfileCount,1)</visible>
					</item>
					<item>
						<label>5</label>
						<onclick>ActivateWindow(Settings)</onclick>
						<icon>icon_button_settings.png</icon>
					</item>
					<item>
						<label>13376</label>
						<onclick>ActivateWindow(FileManager)</onclick>
						<icon>icon_button_filemanager.png</icon>
					</item>
				</content>
			</control>
		</control>
		<include>Header</include>
		<include>CommonNowPlaying</include>
		<include>Footer</include>
		<include content="HomeRecentlyAddedInfo" condition="String.IsEqual(Skin.AspectRatio,16:9)">
			<param name="group-posx">1120r</param>
			<param name="panel-width">1120</param>
		</include>
		<include content="HomeRecentlyAddedInfo" condition="String.IsEqual(Skin.AspectRatio,4:3)">
			<param name="group-posx">640r</param>
			<param name="panel-width">630</param>
		</include>
	</controls>
</window>
