HOW-TO:Add volume value in Confluence: Difference between revisions
(Created page with "This tutorial will show how to add a volume value (percent, number or dB). This is achieved by editing [https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/Di...") |
No edit summary |
||
Line 1: | Line 1: | ||
This tutorial will show how to add a volume value (percent, number or dB). This is achieved by editing [https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/DialogVolumeBar.xml DialogVolumeBar.xml] | {{mininav| [[Skinning]] | [[Confluence]] }} | ||
__FORCETOC__ | |||
This tutorial will show how to add a volume value (percent, number or dB) beside the volume bar. This is achieved by editing [https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/DialogVolumeBar.xml DialogVolumeBar.xml] | |||
<gallery widths=500px heights=70px> | |||
File:Orgvolumebar.png|Original volume bar | |||
File:Volumebarmodpercent.png|MOD - percent value | |||
File:Volumebarmoddb.png|MOD - db value | |||
</gallery> | |||
==Add volume value as percent or number== | |||
A. Open the file [https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/DialogVolumeBar.xml DialogVolumeBar.xml] | |||
B. To fit the volume value you need to make the background wider. Find the following code: | |||
<syntaxhighlight lang="xml"> | |||
<control type="image"> | |||
<left>0</left> | |||
<top>-10</top> | |||
<width>300</width> | |||
<height>50</height> | |||
<texture flipy="true" border="20,20,20,2">InfoMessagePanel.png</texture> | |||
</control> | |||
</syntaxhighlight> | |||
C. Change '''<width>300</width> to <width>345</width>''' | |||
D. Find the ''control'' section that starts with | |||
<syntaxhighlight lang="xml"> | |||
<control type="group"> | |||
<visible>!player.passthrough</visible> | |||
</syntaxhighlight> | |||
E. Add the following code within the ''control'' section. This adds the volume percent value. To get the "number value" you just remove the percent sign. | |||
<syntaxhighlight lang="xml"> | |||
<control type="label"> | |||
<description>Volume value</description> | |||
<top>2</top> | |||
<left>285</left> | |||
<font>font13_title</font> | |||
<label>$INFO[Control.GetLabel(1),,%]</label> | |||
</control> | |||
</syntaxhighlight> | |||
==Add volume value as dB== | |||
A. Open the file [https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/DialogVolumeBar.xml DialogVolumeBar.xml] | |||
B. To fit the dB value you need to make the background wider (needs to be even wider than for percent/number). Find the following code: | |||
<syntaxhighlight lang="xml"> | |||
<control type="image"> | |||
<left>0</left> | |||
<top>-10</top> | |||
<width>300</width> | |||
<height>50</height> | |||
<texture flipy="true" border="20,20,20,2">InfoMessagePanel.png</texture> | |||
</control> | |||
</syntaxhighlight> | |||
C. Change '''<width>300</width> to <width>380</width>''' | |||
D. Find the ''control'' section that starts with | |||
<syntaxhighlight lang="xml"> | |||
<control type="group"> | |||
<visible>!player.passthrough</visible> | |||
</syntaxhighlight> | |||
E. Add the following code within the ''control'' section. This adds the volume dB value. | |||
<syntaxhighlight lang="xml"> | |||
<control type="label"> | |||
<description>Volume value</description> | |||
<top>2</top> | |||
<left>285</left> | |||
<font>font13_title</font> | |||
<label>$INFO[Player.Volume]</label> | |||
</control> | |||
</syntaxhighlight> | |||
[[Category:How-to]] | [[Category:How-to]] |
Revision as of 21:28, 2 November 2015
Skinning | Confluence | HOW-TO:Add volume value in Confluence |
This tutorial will show how to add a volume value (percent, number or dB) beside the volume bar. This is achieved by editing DialogVolumeBar.xml
Add volume value as percent or number
A. Open the file DialogVolumeBar.xml
B. To fit the volume value you need to make the background wider. Find the following code:
<control type="image"> <left>0</left> <top>-10</top> <width>300</width> <height>50</height> <texture flipy="true" border="20,20,20,2">InfoMessagePanel.png</texture> </control>
C. Change <width>300</width> to <width>345</width>
D. Find the control section that starts with
<control type="group"> <visible>!player.passthrough</visible>
E. Add the following code within the control section. This adds the volume percent value. To get the "number value" you just remove the percent sign.
<control type="label"> <description>Volume value</description> <top>2</top> <left>285</left> <font>font13_title</font> <label>$INFO[Control.GetLabel(1),,%]</label> </control>
Add volume value as dB
A. Open the file DialogVolumeBar.xml
B. To fit the dB value you need to make the background wider (needs to be even wider than for percent/number). Find the following code:
<control type="image"> <left>0</left> <top>-10</top> <width>300</width> <height>50</height> <texture flipy="true" border="20,20,20,2">InfoMessagePanel.png</texture> </control>
C. Change <width>300</width> to <width>380</width>
D. Find the control section that starts with
<control type="group"> <visible>!player.passthrough</visible>
E. Add the following code within the control section. This adds the volume dB value.
<control type="label"> <description>Volume value</description> <top>2</top> <left>285</left> <font>font13_title</font> <label>$INFO[Player.Volume]</label> </control>