Text2skin-skin reference: Difference between revisions

From VDR Wiki
Jump to navigation Jump to search
Line 156: Line 156:
|-
|-
|colspan=3|
|colspan=3|
<ellipse x1="5" y1="7" x2="14" y2="15" color="GraphLight" condition="{IsMenuCurrent}"/>
;-(
|}
|}



Revision as of 17:54, 2 January 2005

Hint

This documentation is valid for the "1.0" version of the text2skin-plugin.

Elements

<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" defines wether the skin be drawn relative' to the VDR setup or absolute to the coordinates 720x576
example
<?xml version="1.0"?>
<skin version="1.0" name="brushed Aluminium" screenBase="relative">
  .
  .
  .
</skin>

<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
  • channelInfo
  • channelSmall
  • volume
  • message
  • replayInfo
  • replaySmall
  • menu
Type of the OSD view
example
<?xml version="1.0"?>
<skin version="1.0" name="brushed Aluminium" screenBase="relative">
  <display id="replayInfo">
   .
   .
   .
  </display>
</skin>

<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
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>

<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" />

<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}"/>

<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
;-(

<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 Transparence (0-255)
colors NUMBER Number of colors in the skaled image
color STRING
bgColor STRING
path STRING/TOKEN Image file
example
<image x="0" y="-70" path="Aluminium_volumebar.png" />
<image x="585" y="138" condition="{CanScrollUp}" path="symbols/arrowup.xpm" color="#AFFFFF00" />

<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
  • center
  • right
  • left
Alignment of the text
font STRING Font name
example
<text x1="42" x2="571" y1="-113" y2="-86" color="#FF000000" font="Osd">{ReplayTitle}</text>

<marquee>

An alternative to <text> for length texts.

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
align
  • center
  • right
  • left
Alignment of the text
font STRING Font name
example
;-(

<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
delay NUMBER Delay between switches
align
  • center
  • right
  • left
Alignment of the text
font STRING Font name
example
;-(

<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 Color of the Texte
align
  • center
  • right
  • left
Alignment of the text
font STRING Fontname
example
<scrolltext x1="24" y1="138" y2="-72" x2="583" font="helmetr.ttf:20" color="#AFFFFF00">
{PresentShortText}
{PresentDescription}
</scrolltext>

<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" />

<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}" />

<block>

A <block></block> pools 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>

<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>

<item>

Defines an item for the list.

Attribute Value Description
condition FUNKTION/TOKEN Complex condition
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>

Token

Common

Token Comment Description
DateTime (s.h. "man strftime")

Channel Display

Token Comment Description
ChannelNumber
ChannelName
ChannelShortName
ChannelBouquet
ChannelPortal
ChannelSource
PresentStartDateTime (also in #Menu Display)
PresentVPSDateTime (also in #Menu Display)
PresentEndDateTime (also in #Menu Display)
PresentDuration (also in #Menu Display)
PresentRemaining (also in #Menu Display)
PresentProgress (also in #Menu Display)
PresentTitle (also in #Menu Display)
PresentShortText (also in #Menu Display)
PresentDescription (also in #Menu Display)
FollowingStartDateTime
FollowingVPSDateTime
FollowingEndDateTime
FollowingDuration
FollowingTitle
FollowingShortText
FollowingDescription
ButtonRed (also in #Menu Display, #Replay Display)
ButtonGreen (also in #Menu Display, #Replay Display)
ButtonYellow (also in #Menu Display, #Replay Display)
ButtonBlue (also in #Menu Display, #Replay Display)
Language
HasTeletext
HasMultilang
HasDolby
IsEncrypted
IsRadio
IsRecording
HasVPS (also in #Menu Display)
HasTimer (also in #Menu Display)
IsRunning (also in #Menu Display)

Volume Display

Token Comment Description
VolumeCurrent
VolumeTotal
IsMute

Message Display

Token Comment Description
Message
MessageStatus
MessageInfo
MessageWarning
MessageError

Replay Display

Token Comment Description
ReplayTitle
ReplayPositionIndex
ReplayDurationIndex
ReplayPrompt
IsPlaying
IsFastForward
IsFastRewind
IsSlowForward
IsSlowRewind
IsPausing
ReplayPosition
ReplayDuration
ReplayRemaining
ReplayMode
ButtonRed (also in #Channel Display, #Menu Display)
ButtonGreen (also in #Channel Display, #Menu Display)
ButtonYellow (also in #Channel Display, #Menu Display)
ButtonBlue (also in #Channel Display, #Menu Display)

Menu Display

Token Comment Description
MenuTitle Attribute: "clean"
MenuGroup
IsMenuGroup
MenuItem
IsMenuItem
MenuCurrent
IsMenuCurrent
MenuText Attribute: "clean"
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
CanScrollDown
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)
HasVPS (also in #Channel Display)
HasTimer (also in #Channel Display)
IsRunning (also in #Channel Display)


Functions

not

Negation of the term.

not(equal({PresentStartDateTime},{PresentVPSDateTime}))

and

True, if all parameter are true.

and({CanScrollUp},{CanScrollDown})

or

True, if one parameter is true.

or({CanScrollUp},{CanScrollDown})

equal

True, if both parameters are true.

equal('Kanäle', trans('Channels'))

file

Returns the parameter, if the file exists in the skin directory.

file('logos/{ChannelName}.png')

trans

Rreturn the translation (i18n) of the parameter, false, if no translation is found.

equal('Kanäle', trans('Channels'))