<?xml version="1.0" encoding="UTF-8"?>
<window>
	<onload condition="Window.IsActive(OSDSubtitleSettings)">Dialog.Close(OSDSubtitleSettings)</onload>
	<onload condition="!System.HasAddon(resource.images.languageflags.colour)">InstallAddon(resource.images.languageflags.colour)</onload>
	<controls>
	
		<control type="label">
			<width>100%</width>
			<height>21</height>
			<textcolor>red</textcolor>
			<font>FontSize_18B</font>
			<align>center</align>
			<label>$INFO[Control.GetLabel(140)]</label>
			<visible>Skin.HasSetting(ShowDebugInfo)</visible>
		</control>

		<control type="group">
			<animation type="WindowOpen" reversible="false">
				<effect type="fade" start="0" end="100" time="300" delay="0" tween="sine" easing="out" />
				<effect type="zoom" start="80" end="100" time="450" delay="0" center="auto" tween="back" easing="out" />
			</animation>
			<animation type="WindowClose" reversible="false">
				<effect type="fade" start="100" end="0" time="300" delay="0" tween="sine" easing="out" />
				<effect type="zoom" start="100" end="80" time="450" delay="0" center="auto" tween="back" easing="out" />
			</animation>
			<animation type="Conditional" condition="Window.IsActive(VirtualKeyboard) | Window.IsActive(1110)" reversible="false">
				<effect type="fade" start="100" end="0" time="300" delay="0" tween="sine" easing="out" />
				<effect type="zoom" start="100" end="80" time="450" delay="0" center="auto" tween="back" easing="out" />
			</animation>
			<animation type="Conditional" condition="![Window.IsActive(VirtualKeyboard) | Window.IsActive(1110)]" reversible="false">
				<effect type="fade" start="0" end="100" time="300" delay="0" tween="sine" easing="out" />
				<effect type="zoom" start="80" end="100" time="450" delay="0" center="auto" tween="back" easing="out" />
			</animation>

			<!-- ============== -->
			<!-- Subtitles List -->
			<!-- ============== -->
			<control type="group">
				<top>-10</top>
				<animation effect="fade" start="0" end="100" time="300" delay="200" tween="sine" easing="out" reversible="false">Visible</animation>
				<animation effect="fade" start="100" end="0" time="300" tween="sine" easing="out" reversible="false">Hidden</animation>
				<animation effect="zoom" start="50" end="100" time="450" delay="200" center="auto" tween="back" easing="out" condition="Control.HasFocus(120) + String.IsEmpty(Window.Property(Movement))" reversible="false">Conditional</animation>
				<animation effect="zoom" start="50" end="100" time="450" delay="200" center="auto" tween="back" easing="out" condition="Control.HasFocus(120) + !String.IsEmpty(Window.Property(Movement))" reversible="false">Conditional</animation>
				<animation effect="zoom" start="100" end="50" time="450" center="auto" tween="back" easing="out" condition="!Control.HasFocus(120) + !String.IsEmpty(Window.Property(Movement))" reversible="false">Conditional</animation>
				<animation effect="zoom" start="100" end="50" time="450" center="auto" tween="back" easing="out" condition="!Control.HasFocus(120) + String.IsEmpty(Window.Property(Movement))" reversible="false">Conditional</animation>
				<visible allowhiddenfocus="true">[Control.HasFocus(120) + Integer.IsGreater(Container(120).NumItems,0)]</visible>
				<include content="DialogsPanel">
					<param name="group_left" value="183"/>
					<param name="group_top" value="160"/>
					<param name="group_width" value="909"/>
					<param name="body_width" value="909"/>
					<param name="body_height" value="420"/>
					<param name="header_line_width" value="905"/>
					<param name="header_label" value="$LOCALIZE[24012]"/>
					<param name="header_width" value="700"/>
					<param name="countitems_visible" value="false"/>
				</include>
				<control type="image" id="110">
					<description>Logo</description>
					<left>915</left>
					<top>170</top>
					<width>170</width>
					<height>40</height>
					<aspectratio align="right" aligny="center">keep</aspectratio>
				</control>
				<control type="group">
					<left>203</left>
					<top>230</top>
					<control type="panel" id="120">
						<left>0</left>
						<top>0</top>
						<width>875</width>
						<height>306</height>
						<onright>ClearProperty(Movement)</onright>
						<onleft>SetProperty(Movement,1)</onleft>
						<onleft>150</onleft>
						<onright>150</onright>
						<onup>120</onup>
						<ondown>120</ondown>
						<viewtype label="535">list</viewtype>
						<pagecontrol>121</pagecontrol>
						<scrolltime tween="cubic" easing="out">350</scrolltime>
						<itemlayout height="51">
							<control type="image">
								<width>875</width>
								<height>47</height>
								<texture border="1">buttons/nofocus.png</texture>
							</control>
							<control type="image">
								<left>5</left>
								<top>8</top>
								<width>36</width>
								<height>36</height>
								<texture colordiffuse="viewsinfo" fallback="osd/subs/flag.png">$INFO[ListItem.Thumb,resource://resource.images.languageflags.colour/,.png]</texture>
							</control>
							<control type="image">
								<left>47</left>
								<top>12</top>
								<width>34</width>
								<height>24</height>
								<texture colordiffuse="viewsinfo">osd/subs/icon_hi.png</texture>
								<visible>ListItem.property(hearing_imp)</visible>
							</control>
							<control type="image">
								<left>47</left>
								<top>12</top>
								<width>56</width>
								<height>24</height>
								<texture colordiffuse="viewsinfo">osd/subs/icon_sync.png</texture>
								<visible>ListItem.property(sync)</visible>
								<animation effect="slide" end="40" time="0" condition="ListItem.property(hearing_imp)">Conditional</animation>
							</control>
							<control type="label">
								<left>45</left>
								<top>0</top>
								<width>735</width>
								<height>48</height>
								<font>FontSize_20</font>
								<textcolor>viewsinfo</textcolor>
								<aligny>center</aligny>
								<scroll>false</scroll>
								<label>$INFO[ListItem.Label2]</label>
								<visible>!ListItem.property(sync) + !ListItem.property(hearing_imp)</visible>
							</control>
							<control type="label">
								<left>87</left>
								<top>0</top>
								<width>695</width>
								<height>48</height>
								<font>FontSize_20</font>
								<textcolor>viewsinfo</textcolor>
								<aligny>center</aligny>
								<scroll>false</scroll>
								<label>$INFO[ListItem.Label2]</label>
								<visible>!ListItem.property(sync) + ListItem.property(hearing_imp)</visible>
							</control>
							<control type="label">
								<left>110</left>
								<top>0</top>
								<width>670</width>
								<height>48</height>
								<font>FontSize_20</font>
								<textcolor>viewsinfo</textcolor>
								<aligny>center</aligny>
								<scroll>false</scroll>
								<label>$INFO[ListItem.Label2]</label>
								<visible>ListItem.property(sync) + !ListItem.property(hearing_imp)</visible>
							</control>
							<control type="label">
								<left>150</left>
								<top>0</top>
								<width>630</width>
								<height>48</height>
								<font>FontSize_20</font>
								<textcolor>viewsinfo</textcolor>
								<aligny>center</aligny>
								<scroll>false</scroll>
								<label>$INFO[ListItem.Label2]</label>
								<visible>ListItem.property(sync) + ListItem.property(hearing_imp)</visible>
							</control>
							<control type="image">
								<left>775</left>
								<top>14</top>
								<width>100</width>
								<height>18</height>
								<aspectratio>keep</aspectratio>
								<texture colordiffuse="viewsinfo">osd/subs/info_window_icon_rating_star_$INFO[ListItem.ActualIcon].png</texture>
							</control>
						</itemlayout>
						<focusedlayout height="51">
							<control type="image">
								<width>875</width>
								<height>47</height>
								<texture>buttons/focus.png</texture>
								<include>ListFocusAnimation</include>
							</control>
							<control type="image">
								<left>5</left>
								<top>8</top>
								<width>36</width>
								<height>36</height>
								<texture fallback="osd/subs/flag.png">$INFO[ListItem.Thumb,resource://resource.images.languageflags.colour/,.png]</texture>
							</control>
							<control type="image">
								<left>47</left>
								<top>12</top>
								<width>34</width>
								<height>24</height>
								<texture>osd/subs/icon_hi.png</texture>
								<visible>ListItem.property(hearing_imp)</visible>
							</control>
							<control type="image">
								<left>47</left>
								<top>12</top>
								<width>56</width>
								<height>24</height>
								<texture>osd/subs/icon_sync.png</texture>
								<visible>ListItem.property(sync)</visible>
								<animation effect="slide" end="40" time="0" condition="ListItem.property(hearing_imp)">Conditional</animation>
							</control>
							<control type="label">
								<left>45</left>
								<top>0</top>
								<width>735</width>
								<height>48</height>
								<font>FontSize_20</font>
								<aligny>center</aligny>
								<scroll>false</scroll>
								<label>$INFO[ListItem.Label2]</label>
								<visible>!ListItem.property(sync) + !ListItem.property(hearing_imp)</visible>
							</control>
							<control type="label">
								<left>87</left>
								<top>0</top>
								<width>695</width>
								<height>48</height>
								<font>FontSize_20</font>
								<aligny>center</aligny>
								<scroll>false</scroll>
								<label>$INFO[ListItem.Label2]</label>
								<visible>!ListItem.property(sync) + ListItem.property(hearing_imp)</visible>
							</control>
							<control type="label">
								<left>110</left>
								<top>0</top>
								<width>670</width>
								<height>48</height>
								<font>FontSize_20</font>
								<aligny>center</aligny>
								<scroll>false</scroll>
								<label>$INFO[ListItem.Label2]</label>
								<visible>ListItem.property(sync) + !ListItem.property(hearing_imp)</visible>
							</control>
							<control type="label">
								<left>150</left>
								<top>0</top>
								<width>630</width>
								<height>48</height>
								<font>FontSize_20</font>
								<aligny>center</aligny>
								<scroll>false</scroll>
								<label>$INFO[ListItem.Label2]</label>
								<visible>ListItem.property(sync) + ListItem.property(hearing_imp)</visible>
							</control>
							<control type="image">
								<left>775</left>
								<top>14</top>
								<width>100</width>
								<height>18</height>
								<aspectratio>keep</aspectratio>
								<texture>osd/subs/info_window_icon_rating_star_$INFO[ListItem.ActualIcon].png</texture>
							</control>
						</focusedlayout>
					</control>

					<control type="wraplist" id="31">
						<left>0</left>
						<top>0</top>
						<height>2</height>
						<width>2</width>
						<orientation>horizontal</orientation>
						<focusposition>0</focusposition>
						<autoscroll time="4000">true</autoscroll>
						<viewtype>list</viewtype>
						<itemlayout width="2" height="2"/>
						<focusedlayout width="2" height="2"/>
						<content>
							<item id="1">
								<label></label>
								<visible>Control.IsVisible(130)</visible>
							</item>
							<item id="2">
								<label></label>
								<visible>Integer.IsGreater(Container(120).NumItems,0)</visible>
							</item>
						</content>
					</control>
					<control type="group">
						<left>0</left>
						<top>310</top>
						<width>875</width>
						<control type="label">
							<left>0</left>
							<top>0</top>
							<width>750</width>
							<font>FontSize_20</font>
							<textcolor>disabled</textcolor>
							<label>$LOCALIZE[31166]</label>
							<visible>Container(31).HasFocus(1)</visible>
							<include>BackgroundFade</include>
						</control>
						<control type="label">
							<left>0</left>
							<top>0</top>
							<width>750</width>
							<font>FontSize_20</font>
							<textcolor>disabled</textcolor>
							<label>$INFO[Control.GetLabel(140)] $LOCALIZE[31029] "$INFO[Player.Filename]"</label>
							<visible>Container(31).HasFocus(2)</visible>
							<include>BackgroundFade</include>
						</control>
						<control type="label">
							<description>Pages</description>
							<right>0</right>
							<top>0</top>
							<width>200</width>
							<align>right</align>
							<font>FontSize_20</font>
							<textcolor>disabled</textcolor>
							<label>$INFO[Container(120).CurrentItem,$LOCALIZE[31025] ]$INFO[Container(120).NumItems, $LOCALIZE[31024] ]</label>
							<visible>Integer.IsGreater(Container(120).NumPages,1)</visible>
						</control>
					</control>
				</control>
			</control>

			<!-- ======= -->
			<!-- Options -->
			<!-- ======= -->
			<control type="group">
				<top>10</top>
				<animation effect="fade" start="0" end="100" time="300" delay="200" tween="sine" easing="out" reversible="false">Visible</animation>
				<animation effect="fade" start="100" end="0" time="300" tween="sine" easing="out" reversible="false">Hidden</animation>
				<animation effect="zoom" start="50" end="100" time="450" delay="200" center="auto" tween="back" easing="out" condition="![String.IsEmpty(Container(120).ListItem.Label) + !String.IsEqual(Control.GetLabel(140),$LOCALIZE[24109])]" reversible="false">Conditional</animation>
				<animation effect="zoom" start="50" end="100" time="450" delay="200" center="auto" tween="back" easing="out" condition="[Control.HasFocus(150) | ControlGroup(10000).HasFocus]" reversible="false">Conditional</animation>
				<animation effect="zoom" start="100" end="50" time="450" center="auto" tween="back" easing="out" condition="[String.IsEmpty(Container(120).ListItem.Label) + !String.IsEqual(Control.GetLabel(140),$LOCALIZE[24109])]" reversible="false">Conditional</animation>
				<animation effect="zoom" start="100" end="50" time="450" center="auto" tween="back" easing="out" condition="![Control.HasFocus(150) | ControlGroup(10000).HasFocus]" reversible="false">Conditional</animation>
				<visible allowhiddenfocus="true">[[Control.HasFocus(150) | ControlGroup(10000).HasFocus] + ![String.IsEmpty(Container(120).ListItem.Label) + !String.IsEqual(Control.GetLabel(140),$LOCALIZE[24109])]]</visible>
				<visible>!Window.IsActive(DialogConfirm.xml)</visible>
				<include content="DialogsPanel">
					<param name="group_left" value="445"/>
					<param name="group_top" value="160"/>
					<param name="group_width" value="324"/>
					<param name="body_width" value="384"/>
					<param name="body_height" value="344"/>
					<param name="header_line_width" value="380"/>
					<param name="header_label" value="$LOCALIZE[33063]"/>
					<param name="header_width" value="380"/>
					<param name="countitems_visible" value="false"/>
				</include>
				<control type="group">
					<left>450</left>
					<top>134</top>
					<control type="panel" id="150">
						<left>15</left>
						<top>100</top>
						<width>350</width>
						<height>255</height>
						<onfocus condition="Window.IsActive(VideoOSD)">Dialog.Close(VideoOSD)</onfocus>
						<onleft condition="!String.IsEqual(Control.GetLabel(140),$LOCALIZE[24109])">120</onleft>
						<onleft condition="String.IsEqual(Control.GetLabel(140),$LOCALIZE[24109])">ActivateWindow(1110)</onleft>
						<onright>10000</onright>
						<onup>150</onup>
						<ondown>150</ondown>
						<orientation>vertical</orientation>
						<scrolltime tween="cubic" easing="out">350</scrolltime>
						<itemlayout width="350" height="51">
							<control type="image">
								<left>0</left>
								<top>0</top>
								<width>350</width>
								<height>47</height>
								<texture border="1">buttons/nofocus.png</texture>
							</control>
							<control type="label">
								<left>8</left>
								<top>0</top>
								<width>335</width>
								<height>47</height>
								<font>FontSize_20</font>
								<textcolor>viewsinfo</textcolor>
								<label>$INFO[ListItem.Label,◌   ]</label>
							</control>
							<control type="image">
								<left>0</left>
								<top>0</top>
								<width>350</width>
								<height>47</height>
								<texture>dialogs/selectdialog/selected.png</texture>
								<visible>ListItem.IsSelected</visible>
							</control>
						</itemlayout>
						<focusedlayout width="350" height="51">
							<control type="image">
								<left>0</left>
								<top>0</top>
								<width>350</width>
								<height>47</height>
								<texture>buttons/focus.png</texture>
								<include>ListFocusAnimation</include>
							</control>
							<control type="label">
								<left>8</left>
								<top>0</top>
								<width>335</width>
								<height>47</height>
								<font>FontSize_20</font>
								<label>$INFO[ListItem.Label,◍   ]</label>
							</control>
							<control type="image">
								<left>0</left>
								<top>0</top>
								<width>350</width>
								<height>47</height>
								<texture>dialogs/selectdialog/selected.png</texture>
								<visible>ListItem.IsSelected</visible>
							</control>
						</focusedlayout>
					</control>

					<!-- Control Buttons -->
					<control type="grouplist" id="10000">
						<left>387</left>
						<top>201</top>
						<height>168</height>
						<onleft>150</onleft>
						<onright condition="!String.IsEqual(Control.GetLabel(140),$LOCALIZE[24109])">120</onright>
						<onright condition="String.IsEqual(Control.GetLabel(140),$LOCALIZE[24109])">ActivateWindow(1110)</onright>
						<align>right</align>
						<defaultcontrol always="true">10</defaultcontrol>
						<control type="button" id="11">
							<description>Settings</description>
							<include>DialogsButtonsText</include>
							<texturefocus border="49,0,49,0">dialogs/buttons/settings_focus.png</texturefocus>
							<texturenofocus border="49,0,49,0">dialogs/buttons/settings_nofocus.png</texturenofocus>
							<label>$LOCALIZE[5]</label>
							<onclick>PreviousMenu</onclick>
							<onclick>ActivateWindow(PlayerSettings,subtitles)</onclick>
						</control>
						<control type="button" id="10">
							<description>Manual Search</description>
							<include>DialogsButtonsText</include>
							<texturefocus border="49,0,49,0">dialogs/buttons/edit_focus.png</texturefocus>
							<texturenofocus border="49,0,49,0">dialogs/buttons/edit_nofocus.png</texturenofocus>
							<label>$LOCALIZE[24120]</label>
							<onclick>SendClick(160)</onclick>
						</control>
					</control>
				</control>
			</control>

			<!-- ============== -->
			<!-- Cancel Message -->
			<!-- ============== -->
			<control type="group">
				<left>310</left>
				<top>235</top>
				<animation effect="fade" start="0" end="100" time="300" tween="sine" easing="out" reversible="false">Visible</animation>
				<animation effect="fade" start="100" end="0" time="300" tween="sine" easing="out" reversible="false">Hidden</animation>
				<animation effect="zoom" start="50" end="100" time="450" center="auto" tween="back" easing="out" condition="String.IsEqual(Control.GetLabel(140),$LOCALIZE[24107])" reversible="false">Conditional</animation>
				<animation effect="zoom" start="100" end="50" time="450" center="auto" tween="back" easing="out" condition="!String.IsEqual(Control.GetLabel(140),$LOCALIZE[24107])" reversible="false">Conditional</animation>
				<visible allowhiddenfocus="true">String.IsEqual(Control.GetLabel(140),$LOCALIZE[24107])</visible>
				<include>DialogConfirm</include>
				<control type="label">
					<left>15</left>
					<top>12</top>
					<width>635</width>
					<include>DialogsHeaderLabel</include>
					<label>$LOCALIZE[10153]</label>
				</control>
				<control type="textbox">
					<left>15</left>
					<top>65</top>
					<width>635</width>
					<height>95</height>
					<font>FontSize_22</font>
					<textcolor>viewsinfo</textcolor>
					<autoscroll time="3000" delay="3000" repeat="5000">true</autoscroll>
					<label>$LOCALIZE[31035]$VAR[SubtitlesSearchTitleString]$INFO[Control.GetLabel(100), $LOCALIZE[31228] ]</label>
				</control>
				<!--
					<control type="button" id="88">
					<description>Cancel button</description>
					<left>500</left>
					<top>175</top>
					<width>150</width>
					<height>40</height>
					<include>DialogsButtonsYesNo</include>
					<label>$LOCALIZE[222]</label>
					<onfocus condition="Window.IsActive(VideoOSD)">Dialog.Close(VideoOSD)</onfocus>
					<onclick condition="Window.IsActive(SubtitleSearch)">Dialog.Close(SubtitleSearch)</onclick>
					<visible>!Control.HasFocus(150)</visible>
				</control>
				-->
			</control>

			<control type="label" id="100">
				<description>Service Name</description>
				<visible>false</visible>
			</control>
			<control type="label" id="130">
				<description>Local subtitle available</description>
				<visible>false</visible>
			</control>
			<control type="label" id="140">
				<description>Number of available subtitles</description>
				<visible>false</visible>
			</control>
			<control type="button"  id="160">
				<description>Manual search button</description>
				<visible>false</visible>
			</control>
		</control>
	</controls>
</window>
