<?xml version="1.0" encoding="UTF-8"?>
<window>
	<defaultcontrol always="true">9000</defaultcontrol>
	<menucontrol>6100</menucontrol>
	<onload>ClearProperty(ShowScreenSettings,home)</onload>
	<onload>SetFocus(9000)</onload>
	<onload>RunScript(script.embuary.helper,action=calc,do='"$INFO[Container(12345).NumItems] - 1"',prop=PendingUpdates)</onload>
	<onunload>ClearProperty(ShowScreenSettings,home)</onunload>
	<onunload>ClearProperty(ShutdownKodi,home)</onunload>
	<onunload>SetFocus(9000)</onunload>
	<include>zoom-openclose</include>
	<visible>!System.ScreenSaverActive + Window.IsTopMost(home)</visible>
	<controls>
		<control type="list" id="12345"><!-- Hack to get count of pending updates -->
			<left>-100</left>
			<top>-100</top>
			<width>1</width>
			<height>1</height>
			<itemlayout/>
			<focusedlayout/>
			<include file="Includes_Shelf.xml">AddonUpdated</include>
		</control>
		<include condition="$EXP[isVerticalHome]" file="Includes_VertHome.xml">VertHomeMenu</include>
		<include condition="$EXP[isHorizontalHome]" file="Includes_HorzHome.xml">HorzHomeMenu</include>
		<include condition="$EXP[isIconHome]" file="Includes_IconHome.xml">IconHomeMenu</include>
		<include>touch-controls</include>
		<control type="group"><!-- Screen Settings Menu -->
			<left>0</left>
			<top>1080</top>
			<animation effect="slide" start="0,0" end="0,-1080">Visible</animation>
			<visible allowhiddenfocus="true">[ControlGroup(6100).HasFocus() | String.IsEqual(Window(home).Property(ShowScreenSettings),show)] + !Skin.HasSetting(lock-screensettings)</visible>
			<include>fadebackground</include>
			<control type="image"><!-- Button background -->
				<left>622</left>
				<top>274</top>
				<width>669</width>
				<height>576</height>
				<texture border="14">button-menu-background.png</texture>
			</control>
			<control type="label"><!-- Dialog heading -->
				<left>638</left>
				<top>286</top>
				<width>689</width>
				<height>51</height>
				<font>apptv23</font>
				<label>$LOCALIZE[31557]$INFO[Container(6100).NumItems, (,)]</label>
				<align>center</align>
			</control>
			<control type="button"><!-- Touch Close button -->
				<left>1260</left>
				<top>258</top>
				<width>48</width>
				<height>48</height>
				<texturefocus>touch-close.png</texturefocus>
				<texturenofocus>touch-close.png</texturenofocus>
				<onclick condition="!String.IsEqual(Window(home).Property(ShowScreenSettings),show)">SetProperty(ShowScreenSettings,show,home)</onclick>
				<onclick condition="String.IsEqual(Window(home).Property(ShowScreenSettings),show)">ClearProperty(ShowScreenSettings,home)</onclick>
				<visible>$EXP[isEnabledTouch]</visible>
			</control>
			<control type="image">
				<left>638</left>
				<top>340</top>
				<width>639</width>
				<height>6</height>
				<texture>separator.png</texture>
			</control>
			<control type="grouplist" id="6100">
				<defaultcontrol>6101</defaultcontrol>
				<left>638</left>
				<top>352</top>
				<width>639</width>
				<height>483</height>
				<itemgap>0</itemgap>
				<onright>ClearProperty(ShowScreenSettings,home)</onright>
				<onright>9000</onright>
				<onleft>ClearProperty(ShowScreenSettings,home)</onleft>
				<onleft>9000</onleft>
				<control type="button" id="6101"><!-- Home menu type -->
					<width>639</width>
					<height>69</height>
					<label>$LOCALIZE[31900] - $VAR[MenuType]</label>
					<font>apptv20</font>
					<onclick>SetProperty(Dialog.1.Label,$LOCALIZE[31953])</onclick>
					<onclick>SetProperty(Dialog.1.BuiltIn,Skin.SetBool(HomeMenuIcon)||Skin.Reset(HomeMenuVertical)||Skin.Reset(HomeMenuHorizontal)||ReloadSkin())</onclick>
					<onclick>SetProperty(Dialog.2.Label,$LOCALIZE[31952])</onclick>
					<onclick>SetProperty(Dialog.2.BuiltIn,Skin.SetBool(HomeMenuHorizontal)||Skin.Reset(HomeMenuVertical)||Skin.Reset(HomeMenuIcon)||ReloadSkin())</onclick>
					<onclick>SetProperty(Dialog.3.Label,$LOCALIZE[31951])</onclick>
					<onclick>SetProperty(Dialog.3.BuiltIn,Skin.SetBool(HomeMenuVertical)||Skin.Reset(HomeMenuHorizontal)||Skin.Reset(HomeMenuIcon)||ReloadSkin())</onclick>
					<onclick>RunScript(script.embuary.helper,action=createselect,header=$LOCALIZE[31900])</onclick>
				</control>
				<control type="button" id="6102"><!-- Home Settings Menu -->
					<width>639</width>
					<height>69</height>
					<label>$LOCALIZE[31803]</label>
					<font>apptv20</font>
					<onclick>ActivateWindow(1152)</onclick>
				</control>
				<control type="group" id="6103">
					<visible>!$EXP[isVerticalHome]</visible>
					<width>639</width>
					<height>69</height>
					<control type="togglebutton" id="6104"><!-- Shelf image type -->
						<onup>6102</onup>
						<ondown>6106</ondown>
						<onright>ClearProperty(ShowScreenSettings,home)</onright>
						<onright>9000</onright>
						<onleft>ClearProperty(ShowScreenSettings,home)</onleft>
						<onleft>9000</onleft>
						<textwidth>585</textwidth>
						<label fallback="31575">$INFO[Skin.String(shelf-backgroundtype)]</label>
						<font>apptv20</font>
						<align>right</align>
						<onclick>Skin.SetString(shelf-backgroundtype,$LOCALIZE[20445])</onclick>
						<altclick>Skin.SetString(shelf-backgroundtype,$LOCALIZE[31575])</altclick>
					</control>
					<control type="label">
						<label>$LOCALIZE[31859]</label>
						<font>apptv20</font>
						<textoffsetx>27</textoffsetx>
					</control>
				</control>
				<control type="radiobutton" id="6106"><!-- Home Screen Time -->
					<width>639</width>
					<height>69</height>
					<label>$LOCALIZE[31888]</label>
					<font>apptv20</font>
					<textwidth>585</textwidth>
					<onclick>Skin.ToggleSetting(home-time)</onclick>
					<onclick>AlarmClock(changehome,ReloadSkin(),00:5,silent)</onclick>
					<selected>!Skin.HasSetting(home-time)</selected>
				</control>
				<control type="radiobutton" id="6107"><!-- Home Screen Current Weather -->
					<width>639</width>
					<height>69</height>
					<label>$LOCALIZE[31889]</label>
					<font>apptv20</font>
					<textwidth>585</textwidth>
					<onclick>Skin.ToggleSetting(home-currentweather)</onclick>
					<onclick>AlarmClock(changehome,ReloadSkin(),00:5,silent)</onclick>
					<selected>Skin.HasSetting(home-currentweather)</selected>
					<enable>!String.IsEmpty(Weather.plugin)</enable>
				</control>
				<control type="radiobutton" id="6109"><!-- Show profile name on home screen -->
					<width>639</width>
					<height>69</height>
					<label>$LOCALIZE[31899]</label>
					<onclick>Skin.ToggleSetting(home-profilename)</onclick>
					<font>apptv20</font>
					<textwidth>585</textwidth>
					<selected>Skin.HasSetting(home-profilename)</selected>
				</control>
				<control type="button" id="6108"><!-- Player controls -->
					<width>639</width>
					<height>69</height>
					<label>$LOCALIZE[16003] $LOCALIZE[478]</label>
					<font>apptv20</font>
					<onclick>SetFocus(9000)</onclick>
					<onclick condition="String.IsEqual(Window(home).Property(ShowScreenSettings),show)">ClearProperty(ShowScreenSettings,home)</onclick>
					<onclick>ActivateWindow(playercontrols)</onclick>
					<visible>Player.HasMedia</visible>
				</control>
			</control>
		</control>
		<control type="group">
			<include content="page-indicator">
				<param name="indicatorleft" value="864" />
				<param name="indicatortop" value="-10" />
				<param name="indicatorwidth" value="192" />
				<param name="indicatorheight" value="48" />
				<param name="indicatororientation" value="horizontal" />
				<param name="grp1indicate" value="[ControlGroup(6100).HasFocus()|String.IsEqual(Window(home).Property(ShowScreenSettings),show)]" />
				<param name="grp1visible" value="[!Skin.HasSetting(lock-screensettings)]" />
				<param name="grp2indicate" value="[$EXP[isVerticalHome]+Control.HasFocus(9000)]" />
				<param name="grp2visible" value="[$EXP[isVerticalHome]+[!Skin.HasSetting(lock-screensettings)|$EXP[isEnabledScrollbar]]]" />
				<param name="grp3indicate" value="[$EXP[isVerticalHome]+Control.HasFocus(23)]" />
				<param name="grp3visible" value="[$EXP[isVerticalHome]+$EXP[isEnabledScrollbar]]" />
				<param name="grp4indicate" value="[$EXP[isHorizontalHome]+[ControlGroup(9000).HasFocus()|ControlGroup(9800).HasFocus()]]" />
				<param name="grp4visible" value="[$EXP[isHorizontalHome]+!Skin.HasSetting(lock-screensettings)]" />
				<param name="grp5indicate" value="[$EXP[isIconHome]+[Control.HasFocus(9000)|ControlGroup(9800).HasFocus()]]" />
				<param name="grp5visible" value="[$EXP[isIconHome]+![Skin.HasSetting(lock-screensettings)]]" />
			</include>
		</control>
	</controls>
</window>