Skip to content

Commit

Permalink
Update play speed
Browse files Browse the repository at this point in the history
Add 'play speed' button to video options dialog
Move 'play speed' display to seek bar.
New 'play speed' control dialog
  • Loading branch information
Hitcher committed Jan 24, 2025
1 parent 275416f commit e1e9e46
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 38 deletions.
4 changes: 3 additions & 1 deletion language/resource.language.en_gb/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,9 @@ msgctxt "#31225"
msgid "Video streams"
msgstr ""

#empty string with id to 31226
msgctxt "#31226"
msgid "Play speed"
msgstr ""

msgctxt "#31227"
msgid "Air time"
Expand Down
36 changes: 0 additions & 36 deletions xml/Custom_1111_Overlay_Play_Speed.xml

This file was deleted.

54 changes: 54 additions & 0 deletions xml/Custom_1111_Play_Speed.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<window type="dialog" id="1111">
<defaultcontrol>11</defaultcontrol>
<controls>
<!-- Tempo -->
<control type="group">
<left>120</left>
<top>120</top>
<control type="image">
<width>684</width>
<height>142</height>
<texture>osd/progress_box_tempo.png</texture>
</control>
<control type="button" id="11">
<left>40</left>
<top>50</top>
<width>64</width>
<height>42</height>
<onleft>12</onleft>
<onright>12</onright>
<texturefocus colordiffuse="FocusedColour">dialogs/SpinDown.png</texturefocus>
<texturenofocus colordiffuse="NotFocusedColour">dialogs/SpinDown.png</texturenofocus>
<onclick>PlayerControl(TempoDown)</onclick>
</control>
<control type="button" id="12">
<left>104</left>
<top>50</top>
<width>64</width>
<height>42</height>
<onleft>11</onleft>
<onright>11</onright>
<texturefocus colordiffuse="FocusedColour">dialogs/SpinUp.png</texturefocus>
<texturenofocus colordiffuse="NotFocusedColour">dialogs/SpinUp.png</texturenofocus>
<onclick>PlayerControl(TempoUp)</onclick>
</control>
<control type="image">
<left>204</left>
<top>36</top>
<width>230</width>
<height>66</height>
<texture>$VAR[PlaySpeed]</texture>
</control>
<control type="label">
<left>484</left>
<top>24</top>
<height>60</height>
<aligny>top</aligny>
<font>OSD32</font>
<textcolor>ffffffff</textcolor>
<label>$INFO[Player.PlaySpeed,x]</label>
</control>
</control>
</controls>
</window>
10 changes: 9 additions & 1 deletion xml/Custom_1114_Video_OSD_Options.xml
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,20 @@
<onclick>PlayerControl(ShowVideoMenu)</onclick>
<visible>VideoPlayer.HasMenu</visible>
</item>
<!-- Menu button -->
<!-- Next item button -->
<item id="112">
<label>$VAR[NextVideo]</label>
<onclick>PlayerControl(Next)</onclick>
<visible>Window.IsVisible(VideoFullScreen.xml) + system.getbool(videoplayer.autoplaynextitem)</visible>
</item>
<!-- Play speed button -->
<item id="113">
<label>31226</label>
<label2>[B]$INFO[Player.PlaySpeed][/B]</label2>
<onclick>Dialog.Close(all)</onclick>
<onclick>ActivateWindow(1111)</onclick>
<enable>Player.TempoEnabled</enable>
</item>
</content>
</control>
</control>
Expand Down
30 changes: 30 additions & 0 deletions xml/DialogSeekBar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,36 @@
<visible>!Player.HasGame</visible>
<visible>!Player.FrameAdvance</visible>
<controls>
<!-- Tempo -->
<control type="group">
<left>120</left>
<top>120</top>
<visible>VideoPlayer.IsFullscreen + Player.IsTempo + !Window.IsActive(1111)</visible>
<animation condition="System.IdleTime(2)" reversible="true" type="Conditional">
<effect type="fade" start="100" end="0" time="200"/>
</animation>
<control type="image">
<width>520</width>
<height>142</height>
<texture>osd/progress_box_tempo.png</texture>
</control>
<control type="image">
<left>40</left>
<top>36</top>
<width>230</width>
<height>66</height>
<texture>$VAR[PlaySpeed]</texture>
</control>
<control type="label">
<left>320</left>
<top>24</top>
<height>60</height>
<aligny>top</aligny>
<font>OSD32</font>
<textcolor>ffffffff</textcolor>
<label>$INFO[Player.PlaySpeed,x]</label>
</control>
</control>
<control type="group">
<visible>String.IsEmpty(Window(home).Property(ShowXRay)) + !Window.IsActive(videoosd) + !Window.IsActive(musicosd) + !Window.IsActive(subtitlesearch) + !Window.IsVisible(script-nextup-notification-NextUpInfo.xml)</visible>
<control type="group">
Expand Down

0 comments on commit e1e9e46

Please sign in to comment.