Skip to content

Commit

Permalink
ratings + lang/subtitle toggles on videoosd
Browse files Browse the repository at this point in the history
  • Loading branch information
realcopacetic committed Mar 27, 2024
1 parent bcbbd44 commit ac0c12d
Show file tree
Hide file tree
Showing 16 changed files with 208 additions and 85 deletions.
3 changes: 3 additions & 0 deletions 16x9/Colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,9 @@
<value>$VAR[Light_Color]</value>
</variable>
<variable name="Star_Color">
<!-- temp fix to account for fact that DecreaseRating won't go lower than 1 for VideoPlayer.UserRating -->
<value condition="VideoPlayer.IsFullscreen + Integer.IsGreater(VideoPlayer.UserRating,1.5)">$VAR[User_Rating_Color]</value>
<value condition="VideoPlayer.IsFullscreen + Integer.IsGreater(VideoPlayer.UserRating,0.5) + !String.IsEqual(Window.(videoosd).Property(VideoPlayer_Rating_Fix),true)">$VAR[User_Rating_Color]</value>
<value condition="!String.IsEmpty(ListItem.UserRating)">$VAR[User_Rating_Color]</value>
<value>$VAR[Accent_Color]</value>
</variable>
Expand Down
109 changes: 58 additions & 51 deletions 16x9/Components_Infoscreens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -224,61 +224,68 @@
</include>

<include name="Infoscreen_Stars">
<control type="button" id="4021">
<visible allowhiddenfocus="true">false</visible>
<onfocus>IncreaseRating</onfocus>
<onfocus>SetFocus(7)</onfocus>
</control>
<control type="button" id="4022">
<visible allowhiddenfocus="true">false</visible>
<onfocus>DecreaseRating</onfocus>
<onfocus>SetFocus(7)</onfocus>
</control>
<control type="grouplist">
<visible>$PARAM[visible]</visible>
<include content="Visible_Fade_Delayed_Animation" />
<animation effect="slide" end="330,0" time="0" condition="Window.Is(songinformation) | String.IsEqual(ListItem.DBType,album)" reversible="false">Conditional</animation>
<width>364</width>
<centerleft>50%</centerleft>
<height>360</height>
<centertop>50%</centertop>
<orientation>vertical</orientation>
<align>center</align>
<itemgap>$PARAM[itemgap]</itemgap>
<usecontrolcoords>true</usecontrolcoords>
<control type="image">
<animation effect="zoom" center="auto" start="130" end="100" time="360" tween="back" easing="out" condition="!Control.HasFocus(4021)" reversible="false">Conditional</animation>
<animation effect="slide" end="0,7" time="360" tween="back" easing="out" condition="!Control.HasFocus(4021)" reversible="false">Conditional</animation>
<width>60</width>
<centerleft>50%</centerleft>
<height>60</height>
<texture colordiffuse="$VAR[Light_Color]">dialogs/icon_arrow_focused.png</texture>
</control>
<control type="image">
<height>$PARAM[starheight]</height>
<centerleft>50%</centerleft>
<visible>!ListItem.DBType(season) + !ListItem.DBType(artist)</visible>
<aspectratio>keep</aspectratio>
<texture colordiffuse="$VAR[Star_Color]">$VAR[Rating_Label]</texture>
<param name="parent_id" default="7" />
<param name="itemgap" default="30" />
<param name="starheight" default="90" />
<param name="type" default="ListItem" />
<definition>
<control type="button" id="4021">
<visible allowhiddenfocus="true">false</visible>
<onfocus condition="String.IsEqual(VideoPlayer.UserRating,1)">ClearProperty(VideoPlayer_Rating_Fix,videoosd)</onfocus>
<onfocus>IncreaseRating</onfocus>
<onfocus>SetFocus($PARAM[parent_id])</onfocus>
</control>
<control type="image">
<visible>!String.IsEmpty(ListItem.UserRating)</visible>
<animation effect="rotate" center="auto" end="180" time="0" condition="true" reversible="false">Conditional</animation>
<animation effect="zoom" center="auto" start="130" end="100" time="360" tween="back" easing="out" condition="!Control.HasFocus(4022)" reversible="false">Conditional</animation>
<animation effect="slide" end="0,7" time="360" tween="back" easing="out" condition="!Control.HasFocus(4022)" reversible="false">Conditional</animation>
<width>60</width>
<centerleft>50%</centerleft>
<height>60</height>
<texture colordiffuse="$VAR[Light_Color]">dialogs/icon_arrow_focused.png</texture>
<control type="button" id="4022">
<visible allowhiddenfocus="true">false</visible>
<onfocus condition="String.IsEqual(VideoPlayer.UserRating,1)">SetProperty(VideoPlayer_Rating_Fix,true,videoosd)</onfocus>
<onfocus>DecreaseRating</onfocus>
<onfocus>SetFocus($PARAM[parent_id])</onfocus>
</control>
<control type="image">
<visible>String.IsEmpty(ListItem.UserRating)</visible>
<width>60</width>
<control type="grouplist">
<visible>Control.HasFocus($PARAM[parent_id]) | Control.HasFocus(4021) | Control.HasFocus(4022)</visible>
<include content="Visible_Fade_Delayed_Animation" />
<animation effect="slide" end="330,0" time="0" condition="Window.Is(songinformation) | String.IsEqual(ListItem.DBType,album)" reversible="false">Conditional</animation>
<width>364</width>
<centerleft>50%</centerleft>
<height>60</height>
<texture colordiffuse="$VAR[Light_Color]">flags/blank.png</texture>
<height>360</height>
<centertop>50%</centertop>
<orientation>vertical</orientation>
<align>center</align>
<itemgap>$PARAM[itemgap]</itemgap>
<usecontrolcoords>true</usecontrolcoords>
<control type="image">
<animation effect="zoom" center="auto" start="130" end="100" time="360" tween="back" easing="out" condition="!Control.HasFocus(4021)" reversible="false">Conditional</animation>
<animation effect="slide" end="0,7" time="360" tween="back" easing="out" condition="!Control.HasFocus(4021)" reversible="false">Conditional</animation>
<width>60</width>
<centerleft>50%</centerleft>
<height>60</height>
<texture colordiffuse="$VAR[Light_Color]">dialogs/icon_arrow_focused.png</texture>
</control>
<control type="image">
<height>$PARAM[starheight]</height>
<centerleft>50%</centerleft>
<aspectratio>keep</aspectratio>
<texture colordiffuse="$VAR[Star_Color]">$VAR[Rating_Label]</texture>
</control>
<control type="image">
<visible>!String.IsEmpty($PARAM[type].UserRating)</visible>
<animation effect="rotate" center="auto" end="180" time="0" condition="true" reversible="false">Conditional</animation>
<animation effect="zoom" center="auto" start="130" end="100" time="360" tween="back" easing="out" condition="!Control.HasFocus(4022)" reversible="false">Conditional</animation>
<animation effect="slide" end="0,7" time="360" tween="back" easing="out" condition="!Control.HasFocus(4022)" reversible="false">Conditional</animation>
<width>60</width>
<centerleft>50%</centerleft>
<height>60</height>
<texture colordiffuse="$VAR[Light_Color]">dialogs/icon_arrow_focused.png</texture>
</control>
<control type="image">
<visible>String.IsEmpty($PARAM[type].UserRating)</visible>
<width>60</width>
<centerleft>50%</centerleft>
<height>60</height>
<texture colordiffuse="$VAR[Light_Color]">flags/blank.png</texture>
</control>
</control>
</control>
</definition>
</include>

<include name="Infoscreen_Artwork_Icon">
Expand Down
3 changes: 2 additions & 1 deletion 16x9/Components_OSD.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@
<texturesliderbar colordiffuse="$VAR[Light_Color]">dialogs/dialogseekbar_background.png</texturesliderbar>
<textureslidernibfocus colordiffuse="$VAR[Accent_Color]">dialogs/dialogslider_nib_20.png</textureslidernibfocus>
<info>Player.Progress</info>
<onup>3200</onup>
<onup condition="Window.Is(musicosd) | [VideoPlayer.IsFullscreen + VideoPlayer.Content(livetv)]">3010</onup>
<onup condition="VideoPlayer.IsFullscreen + !VideoPlayer.Content(livetv)">3020</onup>
<ondown>3000</ondown>
<action>seek</action>
<orientation>horizontal</orientation>
Expand Down
70 changes: 59 additions & 11 deletions 16x9/Content_OSD.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,10 @@
<control type="button" id="1">
<include content="Simple_Button_Template">
<param name="description" value="Rating" />
<param name="icon" value="heart_unfilled" />
<param name="icon" value="star" />
</include>
<onfocus>SetProperty(VideoOSD_Controls,$LOCALIZE[33067],videoosd)</onfocus>
<onclick>Dialog.Close(all,true)</onclick>
<onclick>ActivateWindow(fullscreeninfo)</onclick>
<onfocus>SetProperty(VideoOSD_Controls,$LOCALIZE[563],videoosd)</onfocus>
<onclick>SetFocus(4023)</onclick>
<onup>60</onup>
<ondown>8</ondown>
</control>
Expand Down Expand Up @@ -245,7 +244,8 @@
<onclick>Dialog.Close(all,true)</onclick>
<onclick>ActivateWindow(playersettings)</onclick>
<onup>1</onup>
<ondown>60</ondown>
<ondown condition="!VideoPlayer.Content(livetv)">3020</ondown>
<ondown condition="VideoPlayer.Content(livetv)">60</ondown>
</control>
<control type="button" id="9">
<include content="Simple_Button_Template">
Expand All @@ -256,7 +256,8 @@
<onclick>Dialog.Close(all,true)</onclick>
<onclick>ActivateWindow(playerprocessinfo)</onclick>
<onup>2</onup>
<ondown>60</ondown>
<ondown condition="!VideoPlayer.Content(livetv)">3020</ondown>
<ondown condition="VideoPlayer.Content(livetv)">60</ondown>
</control>
<control type="button" id="10">
<include content="Simple_Button_Template">
Expand All @@ -266,7 +267,8 @@
<onfocus>SetProperty(VideoOSD_Controls,$LOCALIZE[10123],videoosd)</onfocus>
<onclick>ActivateWindow(osdvideosettings)</onclick>
<onup>3</onup>
<ondown>60</ondown>
<ondown condition="!VideoPlayer.Content(livetv)">3020</ondown>
<ondown condition="VideoPlayer.Content(livetv)">60</ondown>
</control>
<control type="button" id="11">
<include content="Simple_Button_Template">
Expand All @@ -276,7 +278,8 @@
<onfocus>SetProperty(VideoOSD_Controls,$LOCALIZE[31301],videoosd)</onfocus>
<onclick>PlayerControl(Stop)</onclick>
<onup>4</onup>
<ondown>60</ondown>
<ondown condition="!VideoPlayer.Content(livetv)">3020</ondown>
<ondown condition="VideoPlayer.Content(livetv)">60</ondown>
</control>
<control type="button" id="12">
<include content="Simple_Button_Template">
Expand All @@ -286,8 +289,8 @@
<onfocus>SetProperty(VideoOSD_Controls,$LOCALIZE[10124],videoosd)</onfocus>
<onclick>ActivateWindow(osdaudiosettings)</onclick>
<onup>5</onup>
<ondown>60</ondown>
</control>
<ondown condition="!VideoPlayer.Content(livetv)">3020</ondown>
<ondown condition="VideoPlayer.Content(livetv)">60</ondown>> </control>
<control type="button" id="13">
<include content="Simple_Button_Template">
<param name="description" value="Subtitle OSD settings" />
Expand All @@ -297,7 +300,8 @@
<onfocus>SetProperty(VideoOSD_Controls,$LOCALIZE[10159],videoosd)</onfocus>
<visible>!VideoPlayer.Content(LiveTV)</visible>
<onup>6</onup>
<ondown>60</ondown>
<ondown condition="!VideoPlayer.Content(livetv)">3020</ondown>
<ondown condition="VideoPlayer.Content(livetv)">60</ondown>
</control>
<control type="button" id="14">
<include content="Simple_Button_Template">
Expand All @@ -308,8 +312,52 @@
<onclick>Dialog.Close(all,true)</onclick>
<onclick>ActivateWindow(videoplaylist)</onclick>
<onup>7</onup>
<ondown condition="!VideoPlayer.Content(livetv)">3020</ondown>
<ondown condition="VideoPlayer.Content(livetv)">60</ondown>
</control>
</include>

<include name="videoosd_Toggle_Row_Content">
<control type="button" id="15">
<include content="Simple_Button_Template">
<param name="description" value="Subtitle Language toggle" />
<param name="icon" value="audio" />
</include>
<onclick>AudioNextLanguage</onclick>
<visible>!VideoPlayer.Content(LiveTV)</visible>
<onup>3010</onup>
<ondown>60</ondown>
</control>
<control type="label" id="16">
<height>60</height>
<width max="300">auto</width>
<label>[UPPERCASE]$INFO[VideoPlayer.AudioLanguage]$INFO[VideoPlayer.AudioCodec, ]$VAR[AudioChannels_Label, ][/UPPERCASE]</label>
<textcolor>$VAR[Light_Color]</textcolor>
<font>Breadcrumb_Info</font>
</control>
<control type="label" id="17">
<height>60</height>
<width>60</width>
<textcolor>$VAR[Light_Color]</textcolor>
<font>Breadcrumb_Info</font>
</control>
<control type="button" id="18">
<include content="Simple_Button_Template">
<param name="description" value="Subtitle Language toggle" />
<param name="icon" value="subtitles" />
</include>
<onclick>NextSubtitle</onclick>
<visible>!VideoPlayer.Content(LiveTV)</visible>
<onup>3010</onup>
<ondown>60</ondown>
</control>
<control type="label" id="19">
<height>60</height>
<width max="300">auto</width>
<label>$VAR[videoosd_Subtitle_Toggle_Label]</label>
<textcolor>$VAR[Light_Color]</textcolor>
<font>Breadcrumb_Info</font>
</control>
</include>

</includes>
2 changes: 0 additions & 2 deletions 16x9/DialogMusicInfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@
<content>musicdb://albums/$INFO[ListItem.DBID]/-1/</content>
</include>
<include content="Infoscreen_Stars" condition="!String.IsEqual(ListItem.DBType,artist)">
<param name="visible" value="ControlGroup(3000).HasFocus(7)" />
<param name="itemgap" value="30" />
<param name="starheight" value="60" />
</include>
<control type="textbox">
Expand Down
6 changes: 1 addition & 5 deletions 16x9/DialogVideoInfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@
<param name="align" value="center" />
<param name="font" value="Plot_Fullscreen" />
</include>
<include content="Infoscreen_Stars">
<param name="visible" value="ControlGroup(3000).HasFocus(7)" />
<param name="itemgap" value="30" />
<param name="starheight" value="90" />
</include>
<include content="Infoscreen_Stars" condition="!String.IsEqual(ListItem.DBType,season)" />
<include content="Infoscreen_Details" condition="Integer.IsGreater(ListItem.DBID,0) + [String.IsEqual(ListItem.DBType,movie) | String.IsEqual(ListItem.DBType,episode)]">
<param name="visible" value="ControlGroup(3000).HasFocus(96)" />
</include>
Expand Down
8 changes: 5 additions & 3 deletions 16x9/SmartPlaylistEditor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<param name="window_name" value="smartplaylisteditor" />
<param name="side" value="right" />
<param name="width" value="870" />
<param name="height" value="100%" />
<param name="height" value="720" />
<param name="top" value="0" />
<param name="onleft" value="100" />
<param name="onright" value="14" />
Expand All @@ -38,9 +38,11 @@
<param name="focus_border_margin_right" value="60" />
<param name="smartplaylisteditor" value="true" />
</include>
<include content="Dialog_Divider">
<param name="left" value="960" />
<include content="Dialog_Divider_With_Scrollbar">
<param name="scrollbarvisible" value="Control.HasFocus(10)" />
<param name="height" value="720" />
<param name="left" value="960" />
<param name="scrollbaralignleft" value="true" />
</include>
<include content="Button_Group_Template">
<param name="bottom" value="15" />
Expand Down
15 changes: 13 additions & 2 deletions 16x9/Templates_OSD.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@
</include>

<include name="OSD_Row">
<param name="top" default="0" />
<definition>
<control type="grouplist" id="$PARAM[id]">
<top>$PARAM[top]</top>
<height>60</height>
<orientation>horizontal</orientation>
<align>center</align>
Expand All @@ -103,22 +105,31 @@
<param name="info_label_visible" value="true" />
</include>
<control type="grouplist">
<visible>!Control.HasFocus(4023) + !Control.HasFocus(4021) + !Control.HasFocus(4022)</visible>
<include content="VisibleHidden_Fade_Delayed_Animation" />
<animation effect="slide" end="-600,290" time="0" condition="Window.Is(musicosd) + !Skin.String(visualisation_Layout,Large)">Conditional</animation>
<animation effect="slide" end="0,45" time="0" condition="Window.Is(videoosd) + !VideoPlayer.Content(livetv)">Conditional</animation>
<centerleft>50%</centerleft>
<centertop>50%</centertop>
<width>$PARAM[width]</width>
<height>180</height>
<height>600</height>
<orientation>vertical</orientation>
<align>center</align>
<itemgap>0</itemgap>
<usecontrolcoords>true</usecontrolcoords>
<include content="OSD_Row">
<param name="id" value="3000" />
<include content="$PARAM[windowname]_Top_Row_Content" />
</include>
<include content="OSD_Row">
<param name="id" value="3200" />
<param name="id" value="3010" />
<include content="$PARAM[windowname]_Bottom_Row_Content" />
</include>
<include content="OSD_Row" condition="VideoPlayer.IsFullscreen + !VideoPlayer.Content(livetv)">
<param name="id" value="3020" />
<param name="top" value="90" />
<include content="videoosd_Toggle_Row_Content" />
</include>
</control>
<include content="Player_Status_Icons" condition="!Window.Is(visualisation)">
<param name="large_label" value="true" />
Expand Down
Loading

0 comments on commit ac0c12d

Please sign in to comment.