Text2skin-skin reference
From VDR Wiki
This documentation is valid for the "1.0" version of the text2skin-plugin.
Contents |
[edit] Elements
[edit] <skin>
This is the root element of the skins. All further elements go inside this container.
Attribute | Value | Description |
---|---|---|
version | VERSION | Version of the skin-format, currently fix "1.0" |
name | NAME | Name to display in the VDR-OSD |
screenBase | "relative","absolute" | Should the skin be drawn "relative" (OSD left, top, width, height) to the VDR setup or "absolute" to an area of 720x576 |
example | ||
<?xml version="1.0"?> <skin version="1.0" name="brushed Aluminium" screenBase="relative"> . . . </skin> |
[edit] <display>
For each view of the OSD display a separate <display>-section is required. The most important views are "main" and "channelInfo".
Attribute | Value | Description |
---|---|---|
id |
| Type of the OSD view |
example | ||
<?xml version="1.0"?> <skin version="1.0" name="brushed Aluminium" screenBase="relative"> <display id="replayInfo"> . . . </display> </skin> |
[edit] <window>
Each <display>-container has to start with a definition of drawing areas. Inside it's drawing areas some elements may be drawn.
Attribute | Value | Description |
---|---|---|
x1 | NUMBER | Position of the left border |
y1 | NUMBER | Position of the top border |
x2 | NUMBER | Position of the right border |
y2 | NUMBER | Position of the bottom border |
bpp | NUMBER | Color depth of the drawing area (4 = 16 colors, 8 = 256 colors) |
example | ||
<?xml version="1.0"?> <skin version="1.0" name="brushed Aluminium" screenBase="relative"> <display id="replayInfo"> <window x1="0" x2="619" y1="-113" y2="-84" bpp="4" /> <window x1="20" x2="99" y1="-83" y2="-44" bpp="4" /> . . . </display> </skin> |
[edit] <rectangle>
Draws a filled rectangle.
Attribute | Value | Description |
---|---|---|
x1 | NUMBER | Position of the left border |
y1 | NUMBER | Position of the top border |
x2 | NUMBER | Position of the right border |
y2 | NUMBER | Position of the bottom border |
condition | FUNCTION/TOKEN | Complex condition |
color | STRING | Color of the rectangle |
example | ||
<rectangle x1="20" x2="99" y1="-83" y2="-44" color="#00000000" /> |
[edit] <ellipse>
Draws a circle, a pitch circle, or a ellipse.
Attribute | Value | Description |
---|---|---|
x1 | NUMBER | Position of the left border |
y1 | NUMBER | Position of the top border |
y2 | NUMBER | Position of the right border |
x2 | NUMBER | Position of the bottom border |
condition | FUNCTION/TOKEN | Complex condition |
color | STRING | Color |
arc | NUMBER | pitch circle |
example | ||
<ellipse x1="5" y1="7" x2="14" y2="15" color="GraphLight" condition="{IsMenuCurrent}"/> |
[edit] <slope>
Draws a curve.
Attribute | Value | Description |
---|---|---|
x1 | NUMBER | Position of the left border |
y1 | NUMBER | Position of the top border |
y2 | NUMBER | Position of the right border |
x2 | NUMBER | Position of the bottom border |
condition | FUNCTION/TOKEN | Complex condition |
color | STRING | Color |
arc | NUMBER | Direction |
example | ||
;-( |
[edit] <image>
Display an image.
Attribute | Value | Description |
---|---|---|
x | NUMBER | Position of the left border (keine Skalierung) |
y | NUMBER | Position of the top border (keine Skalierung) |
x1 | NUMBER | Position of the left border (mit Skalierung) |
y1 | NUMBER | Position of the top border (mit Skalierung) |
x2 | NUMBER | Position of the right border (mit Skalierung) |
y2 | NUMBER | Position of the bottom border (mit Skalierung) |
condition | FUNCTION/TOKEN | Complex condition |
alpha | NUMBER | transparency (0-255) |
colors | NUMBER | maximum number of colors inside picture (if scaled) |
color | STRING | replacement color for color 1 of picture |
bgColor | STRING | replacement color for color 0 of picture |
path | STRING/TOKEN | path to picture |
example | ||
<image x="0" y="-70" path="Aluminium_volumebar.png" /> <image x="585" y="138" condition="{CanScrollUp}" path="symbols/arrowup.xpm" color="#AFFFFF00" /> |
[edit] <text>
A static or compound text.
Attribute | Value | Description |
---|---|---|
x1 | NUMBER | Position of the left border |
y1 | NUMBER | Position of the top border |
y2 | NUMBER | Position of the right border |
x2 | NUMBER | Position of the bottom border |
condition | FUNCTION/TOKEN | Complex condition |
color | STRING | Text color |
align |
| Alignment of the text |
font | STRING | Font name |
example | ||
<text x1="42" x2="571" y1="-113" y2="-86" color="#FF000000" font="Osd">{ReplayTitle}</text> |
[edit] <marquee>
An alternative to <text> for oversized texts. Scrolls text if needed.
Attribute | Value | Description |
---|---|---|
x1 | NUMBER | Position of the left border |
y1 | NUMBER | Position of the top border |
y2 | NUMBER | Position of the right border |
x2 | NUMBER | Position of the bottom border |
condition | FUNCTION/TOKEN | Complex condition |
color | STRING | Text color |
delay | NUMBER | delay time for scrolling in msec |
align |
| Alignment of the text |
font | STRING | Font name |
example | ||
<marquee x1="130" x2="480" y1="423" y2="445" color="Text" font="Sml">{ReplayTitle}</marquee> |
[edit] <blink>
An alternative to <text> which lets the text blink.
Attribute | Value | Description |
---|---|---|
x1 | NUMBER | Position of the left border |
y1 | NUMBER | Position of the top border |
y2 | NUMBER | Position of the right border |
x2 | NUMBER | Position of the bottom border |
condition | FUNCTION/TOKEN | Complex condition |
color | STRING | Text color |
blinkColor | STRING | Highlight color (optional; default: on/off) |
delay | NUMBER | Delay time for blinking |
align |
| Alignment of the text |
font | STRING | Font name |
example | ||
<blink x1="30" x2="80" y1="90" y2="80" color="Text" blinkColor="Green" delay="800" font="Sml" condition="{IsRunning}"> {PresentStartDateTime:%H\:%M} </blink>; |
[edit] <scrolltext>
A multiline text.
Attribute | Value | Description |
---|---|---|
x1 | NUMBER | Position of the left border |
y1 | NUMBER | Position of the top border |
y2 | NUMBER | Position of the right border |
x2 | NUMBER | Position of the bottom border |
condition | FUNCTION/TOKEN | Complex condition |
color | STRING | font color |
align |
| Alignment of the text |
font | STRING | font name |
example | ||
<scrolltext x1="24" y1="138" y2="-72" x2="583" font="helmetr.ttf:20" color="#AFFFFF00"> {PresentShortText} {PresentDescription} </scrolltext> |
[edit] <scrollbar>
A scrollbar.
Attribute | Value | Description |
---|---|---|
x1 | NUMBER | Position of the left border |
y1 | NUMBER | Position of the top border |
y2 | NUMBER | Position of the right border |
x2 | NUMBER | Position of the bottom border |
condition | FUNCTION/TOKEN | Complex condition |
color | STRING | Color of the bar |
bgColor | STRING | Color of the background |
example | ||
<scrollbar x1="585" x2="608" y1="162" y2="-110" color="#AFFFFF00" bgColor="#8F2B1B9E" /> |
[edit] <progress>
A progressbar.
Attribute | Value | Description |
---|---|---|
x1 | NUMBER | Position of the left border |
y1 | NUMBER | Position of the top border |
y2 | NUMBER | Position of the right border |
x2 | NUMBER | Position of the bottom border |
condition | FUNCTION/TOKEN | Complex condition |
color | STRING | Color of the bar |
bgColor | STRING | Color of the background |
mark | STRING | Color of the cutting marks |
active | STRING | Color of the active area |
keep | STRING | Color of the video area to keep |
current | NUMBER/TOKEN | Current index value |
total | NUMBER/TOKEN | Maximum index value |
example | ||
<progress x1="19" x2="556" y1="-17" y2="-7" color="#AF000000" current="{VolumeCurrent}" total="{VolumeTotal}" /> <progress x1="129" x2="478" y1="487" y2="502" color="#FFCE7B00" bgColor="Blue" mark="Black" active="Black" keep="Black" current="{ReplayPositionIndex}" total="{ReplayDurationIndex}"/> |
[edit] <block>
A <block></block> groups several objects together.
Attribute | Value | Description |
---|---|---|
condition | FUNCTION | Complex condition |
example | ||
<block condition="file('logos/{ChannelName}.mng')"> <rectangle x1="4" x2="67" y1="4" y2="51" color="#AF000000" /> <image x="0" y="0" path="logos/{ChannelName}.mng" /> </block> |
[edit] <list>
Defines a list in the menu.
Attribute | Value | Description |
---|---|---|
x1 | NUMBER | Position of the left border |
y1 | NUMBER | Position of the top border |
y2 | NUMBER | Position of the right border |
x2 | NUMBER | Position of the bottom border |
condition | FUNCTION/TOKEN | Complex condition |
example | ||
<list x1="24" y1="62" x2="569" y2="-82"> <item height="28"/> <text x1="25" x2="569" y1="3" y2="27" color="#AF00FFFF" font="Sml">{MenuGroup}</text> <text x1="25" x2="569" y1="3" y2="27" color="#AFFFFFFF" font="Sml">{MenuItem}</text> <rectangle x1="0" x2="579" y1="0" y2="27" color="#FF2B1B9E" condition="{IsMenuCurrent}" /> <text x1="22" x2="569" y1="0" y2="27" color="#AFFFFFFF" font="Osd">{MenuCurrent}</text> <text x1="0" x2="25" y1="0" y2="27" color="#AFFFFFFF" font="Osd">-></text> </list> |
[edit] <item>
Defines an item for the list.
Attribute | Value | Description |
---|---|---|
condition | FUNKTION/TOKEN | Complex condition (possible, but makes no sense here) |
height | NUMBER | Height of one list item |
example | ||
<list x1="24" y1="62" x2="569" y2="-82"> <item height="28" /> <text x1="25" x2="569" y1="3" y2="27" color="#AF00FFFF" font="Sml">{MenuGroup}</text> <text x1="25" x2="569" y1="3" y2="27" color="#AFFFFFFF" font="Sml">{MenuItem}</text> <rectangle x1="0" x2="579" y1="0" y2="27" color="#FF2B1B9E" condition="{IsMenuCurrent}" /> <text x1="22" x2="569" y1="0" y2="27" color="#AFFFFFFF" font="Osd">{MenuCurrent}</text> <text x1="0" x2="25" y1="0" y2="27" color="#AFFFFFFF" font="Osd">-></text> </list> |
[edit] Token
[edit] Common
Token | Comment | Description |
---|---|---|
DateTime | (see "man strftime") | actual date/time |
CurrentRecording | delivers every 2 secs all actual recordings Attribute: Number to choose n-th current recording | |
FreeDiskSpace | Remaining free disk space in MB Attribute: return as formatted time. |
[edit] Channel Display
Token | Comment | Description |
---|---|---|
ChannelNumber | channel number ("channel number-" if there is an input at this time) | |
ChannelName | channel or group name | |
ChannelShortName | short channel name, if available | |
ChannelBouquet | provider/bouquet name, if available | |
ChannelPortal | portal name, if available | |
ChannelSource | Signal source (i.e. "S19.2E") | |
PresentStartDateTime | (also in #Menu Display) | start time of actual title |
PresentVPSDateTime | (also in #Menu Display) | VPS start time of actual title, if available |
PresentEndDateTime | (also in #Menu Display) | end time of actual title |
PresentDuration | (also in #Menu Display) | duration actual title |
PresentRemaining | (also in #Menu Display) | time left of actual title |
PresentProgress | (also in #Menu Display) | progress actual title |
PresentTitle | (also in #Menu Display) | title |
PresentShortText | (also in #Menu Display) | short name/episode actual title |
PresentDescription | (also in #Menu Display) | description actual title |
PresentHasTimer | (auch in #Menu Display) | True, if a timer for the following title is set |
PresentIsRunning | (also in #Menu Display) | True, if the following title has the state "running" |
PresentHasVPS | (also in #Menu Display) | True, if VPS for the following title is available |
FollowingStartDateTime | start time next title | |
FollowingVPSDateTime | VPS start time next title, if available | |
FollowingEndDateTime | end time next title | |
FollowingDuration | duration next title | |
FollowingTitle | name next title | |
FollowingShortText | short name/episode next title | |
FollowingDescription | description next title | |
FollowingHasTimer | True, if the following title is targeted by a timer | |
FollowingIsRunning | True, if the following title has the status "running" | |
FollowingHasVPS | True, if the following title has it's own VPS-time | |
ButtonRed | (also in #Menu Display, #Replay Display) | text red button, if available |
ButtonGreen | (also in #Menu Display, #Replay Display) | text green button, if available |
ButtonYellow | (also in #Menu Display, #Replay Display) | text yellow button, if available |
ButtonBlue | (also in #Menu Display, #Replay Display) | text blue button, if available |
Language | language (up to now only "Audio 1", "Audio 2" oder "Digital Audio") | |
ChannelHasTeletext (alt:HasTeletext) | true, if teletext on actual channel | |
ChannelHasMultilang (alt: HasMultilang) | true, if multi language on actual channel | |
ChannelHasDolby (alt: HasDolby) | true, if Dolby Digital on actual channel | |
ChannelIsEncrypted (alt: IsEncrypted) | true, if actual channel is encrypted | |
ChannelIsRadio (alt: IsRadio) | true, if actual channel is a radio channel | |
ChannelHasVPS (alt: HasVPS) | (also in #Menu Display) | true for VPS channels |
[edit] Volume Display
Token | Comment | Description |
---|---|---|
VolumeCurrent | actual numerical volume | |
VolumeTotal | maximum numerical volume | |
VolumeIsMute (alt: IsMute) | true if volume muted |
[edit] Message Display
Token | Comment | Description |
---|---|---|
Message | (also in all other displays) | text of actual message, if available |
MessageStatus | (also in all other displays) | text of actual status message, if available |
MessageInfo | (also in all other displays) | text of actual information message, if available |
MessageWarning | (also in all other displays) | text of actual warning message, if available |
MessageError | (also in all other displays) | text of actual error message, if available |
[edit] Replay Display
Token | Comment | Description |
---|---|---|
ReplayTitle | Attribut: clean | title of actual playback |
ReplayPositionIndex | progress of actual playback (numerical, analog to PresentProgress) | |
ReplayDurationIndex | duration of actual playback (numerical, analog to PresentProgress) | |
ReplayRemaining | time left of actual playback (numerical, analog to PresentProgress) | |
ReplayPrompt | input request, if available (i.e. "jump to : --:--") | |
ReplayIsPlaying (alt: IsPlaying) | Attribut: 0 = kein Multispeed, 1-3 = Multispeed, keines = egal | true, if playback at normal speed |
ReplayIsFastForward (alt: IsFastForward) | Attribut: 0 = kein Multispeed, 1-3 = Multispeed, keines = egal | true, if fast forward |
ReplayIsFastRewind (alt: IsFastRewind) | Attribut: 0 = kein Multispeed, 1-3 = Multispeed, keines = egal | true, if fast rewind |
ReplayIsSlowForward (alt: IsSlowForward) | Attribut: 0 = kein Multispeed, 1-3 = Multispeed, keines = egal | true, if slow motion forward |
ReplayIsSlowRewind (alt: IsSlowRewind) | Attribut: 0 = kein Multispeed, 1-3 = Multispeed, keines = egal | true, if slow motion backward |
ReplayIsPausing (alt: IsPausing) | Attribut: 0 = kein Multispeed, 1-3 = Multispeed, keines = egal | true, if paused |
ReplayPosition | postion in playback, formatted with frames on cutting marks | |
ReplayDuration | duration playback, formatted | |
ReplayRemaining | time left playback | |
ReplayMode | kind of replay ("dvd", "vcd", "normal") | |
ButtonRed | (also in #Channel Display, #Menu Display) | text red button, if available |
ButtonGreen | (also in #Channel Display, #Menu Display) | text green button, if available |
ButtonYellow | (also in #Channel Display, #Menu Display) | text yellow button, if available |
ButtonBlue | (also in #Channel Display, #Menu Display) | text blue button, if available |
ReplayIsShuffle | True, if replay is in shuffle mode (currently only MP3) | |
ReplayIsLoop | True, if replay is in loop mode (currently only MP3) |
[edit] Menu Display
Token | Comment | Description |
---|---|---|
MenuTitle | Attribute: "clean", "rest" | caption or filtered caption with "clean", or remaining of the filtered title with "rest" |
MenuGroup | text of actual item if this is a group | |
IsMenuGroup | true if group | |
MenuItem | text of item, if normal item | |
IsMenuItem | true if normal item | |
MenuCurrent | Attribute: "clean" | text of actual selected item |
IsMenuCurrent | true if actaul drawn item is selected | |
MenuText | Attribute: "clean" | menu page to be shown instead of list |
ButtonRed | (also in #Channel Display, #Replay Display) | |
ButtonGreen | (also in #Channel Display, #Replay Display) | |
ButtonYellow | (also in #Channel Display, #Replay Display) | |
ButtonBlue | (also in #Channel Display, #Replay Display) | |
CanScrollUp | true if scrollable text which may scrolled up | |
CanScrollDown | true if scrollable text which may scrolled down | |
PresentStartDateTime | (also in #Channel Display) | |
PresentVPSDateTime | (also in #Channel Display) | |
PresentEndDateTime | (also in #Channel Display) | |
PresentDuration | (also in #Channel Display) | |
PresentProgress | (also in #Channel Display) | |
PresentTitle | (also in #Channel Display) | |
PresentShortText | (also in #Channel Display) | |
PresentDescription | (also in #Channel Display) | |
PresentHasVPS | (also in #Channel Display) | |
PresentHasTimer (alt: HasTimer) | (also in #Channel Display) | |
PresentIsRunning (alt: IsRunning) | (also in #Channel Display) | |
ChannelHasVPS (alt: HasVPS) | (also in #Channel Display) |
[edit] Audio Tracks Display
Token | Bemerkung | Beschreibung |
---|---|---|
MenuTitle | Title display of the audio-track list | |
AudioTrack | (also in all other displays) | Identifier the current selected audio-track |
AudioChannel | (also in all other displays) | Identifier of the switched channeld ("stereo", "left" or "right") |
[edit] Functions
[edit] not
Negation of the term.
not(equal({PresentStartDateTime},{PresentVPSDateTime}))
[edit] and
True, if all parameter are true.
and({CanScrollUp},{CanScrollDown})
[edit] or
True, if at least one parameter is true.
or({CanScrollUp},{CanScrollDown})
[edit] equal
True, if both parameters are true.
equal('Kanäle', trans('Channels'))
[edit] ne
True, if both parameter are unequal (not equal).
ne({ReplayMode}, 'normal')
[edit] gt
True, if the first parameter is greater than the second.
gt({FreeDiskSpace},5000)
[edit] ge
True, if the first parameter is greater or equal than the second
ge({FreeDiskSpace},5000)
[edit] lt
True, if the first parameter is less than the second.
lt({FreeDiskSpace},5000)
[edit] le
True, if the first parameter is less or equal than the second.
gt({FreeDiskSpace},5000)
[edit] file
Returns the parameter, if the file exists in the skin directory.
file('logos/{ChannelName}.png')
[edit] trans
Returns the translation (i18n) of the parameter or false, if no translation is found.
equal('Kanäle', trans('Channels'))
[edit] Attributes
[edit] arc
Attribut | Wert | Bedeutung | |
---|---|---|---|
arc | 0 | ellipse: full ellipse | slope: horizontal, rising, bottom |
1 | ellipse: first quadrant | slope: horizontal, rising, top | |
2 | ellipse: second quadrant | slope: horizontal, falling, bottom | |
3 | ellipse: third quadrant | slope: horizontal, falling, top | |
4 | ellipse: forth quadrant | slope: vertical, rising, right | |
5 | ellipse: right hand side | slope: vertical, rising, left | |
6 | ellipse: Top | slope: vertical, falling, right | |
7 | ellipse: left hand side | slope: vertical, falling, left | |
8 | ellipse: Bottom | ||
-1..-8 | ellipse: like before, but invertiert |
[edit] color
also valid for: bgColor, blinkColor, mark, active, keep
Colors are given in RGB format (as in html code) with transparency like this:
color="#AARRGGBB".
Colors might be given as symbolic value which has to be defined in .colors file of the skin, i.e.
color="MenuTextFg"
- A = Alpha value (intensity or transparency)
- R = red value
- G = green value
- B = blue value
some examples:
AARRGGBB color="#00000000" = black, fully transparent (translucent) color="#FF000000" = black, not translucent color="#7F000000" = black, half translucent color="#7FFFFFFF" = white, half translucent
for shure you can use every value between.
[edit] font
Three fonts are given by the plugin
- Osd
- Fix
- Sml
For those who have installed the freetype library and activated at compile time every font found at
- /etc/vdr/plugins/text2skin/fonts/
or
- /etc/vdr/plugins/text2skin/SkinName/
is usable.
In the skin file the font name,
font="Osd"
or, for Truetype fonts, the font filename and size (and optional width too)
font="helmetr.ttf:SIZE[,WIDTH]"
is given.