Text2skin-skin reference: Difference between revisions

From VDR Wiki
Jump to navigation Jump to search
No edit summary
(+<marquee>, sequence)
Line 131: Line 131:
|}
|}


===<text>===
===<ellipse>===
Draws a circle, a pitch circle, or a ellipse.
A static or compound text.
{| border=1 cellpadding=2 cellspacing=0 width=100% style="border-collapse:collapse;"
{| border=1 cellpadding=2 cellspacing=0 width=100% style="border-collapse:collapse;"
|- bgcolor=#efefef
|- bgcolor=#efefef
Line 149: Line 149:
| condition || FUNCTION/TOKEN || Complex condition
| condition || FUNCTION/TOKEN || Complex condition
|-
|-
| color || STRING || Text [[Text2skin-skin creation#Colors|color]]
| color || STRING || [[Text2skin-skin creation#Colors|Color]]
|-
|-
| align ||
| arc || NUMBER || pitch circle
|- bgcolor=#efefef
* center
!Beispiel
* right
|
* left
|
| Alignment of the text
|-
|-
|colspan=3|
| font || STRING || [[Text2skin-skin creation#True-type Fonts|Font]] name
;-(
|}

===<slope>===
Draws a curve.
{| border=1 cellpadding=2 cellspacing=0 width=100% style="border-collapse:collapse;"
|- bgcolor=#efefef
!width=20%|Attribute
!width=20%|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 || [[Text2skin-skin creation#Colors|Color]]
|-
| arc || NUMBER || Direction
|- bgcolor=#efefef
|- bgcolor=#efefef
!Beispiel
!Beispiel
Line 164: Line 188:
|-
|-
|colspan=3|
|colspan=3|
;-(
<text x1="42" x2="571" y1="-113" y2="-86" color="#FF000000" font="Osd">{ReplayTitle}</text>
|}
|}


Line 206: Line 230:
|}
|}


===<ellipse>===
===<text>===
A static or compound text.
Draws a circle, a pitch circle, or a ellipse.
{| border=1 cellpadding=2 cellspacing=0 width=100% style="border-collapse:collapse;"
{| border=1 cellpadding=2 cellspacing=0 width=100% style="border-collapse:collapse;"
|- bgcolor=#efefef
|- bgcolor=#efefef
Line 224: Line 248:
| condition || FUNCTION/TOKEN || Complex condition
| condition || FUNCTION/TOKEN || Complex condition
|-
|-
| color || STRING || [[Text2skin-skin creation#Colors|Color]]
| color || STRING || Text [[Text2skin-skin creation#Colors|color]]
|-
|-
| arc || NUMBER || pitch circle
| align ||
* center
* right
* left
| Alignment of the text
|-
| font || STRING || [[Text2skin-skin creation#True-type Fonts|Font]] name
|- bgcolor=#efefef
|- bgcolor=#efefef
!Beispiel
!Beispiel
Line 233: Line 263:
|-
|-
|colspan=3|
|colspan=3|
<text x1="42" x2="571" y1="-113" y2="-86" color="#FF000000" font="Osd">{ReplayTitle}</text>
;-(
|}
|}


===<slope>===
===<text>===
An alternative to [[#<text>|<text>]] for length texts.
Draws a curve.
{| border=1 cellpadding=2 cellspacing=0 width=100% style="border-collapse:collapse;"
{| border=1 cellpadding=2 cellspacing=0 width=100% style="border-collapse:collapse;"
|- bgcolor=#efefef
|- bgcolor=#efefef
Line 254: Line 284:
| condition || FUNCTION/TOKEN || Complex condition
| condition || FUNCTION/TOKEN || Complex condition
|-
|-
| color || STRING || [[Text2skin-skin creation#Colors|Color]]
| color || STRING || Text [[Text2skin-skin creation#Colors|color]]
|-
|-
| arc || NUMBER || Direction
| align ||
* center
* right
* left
| Alignment of the text
|-
| font || STRING || [[Text2skin-skin creation#True-type Fonts|Font]] name
|- bgcolor=#efefef
|- bgcolor=#efefef
!Beispiel
!Beispiel
Line 266: Line 302:
|}
|}


===<progress>===
===<scrolltext>===
A multiline text.
A progressbar.
{| border=1 cellpadding=2 cellspacing=0 width=100% style="border-collapse:collapse;"
{| border=1 cellpadding=2 cellspacing=0 width=100% style="border-collapse:collapse;"
|- bgcolor=#efefef
|- bgcolor=#efefef
Line 284: Line 320:
| condition || FUNCTION/TOKEN || Complex condition
| condition || FUNCTION/TOKEN || Complex condition
|-
|-
| color || STRING || [[Text2skin-skin creation#Colors|Color]] of the bar
| color || STRING || [[Text2skin-skin creation#Colors|Color]] of the Texte
|-
|-
| align ||
| bgColor || STRING || [[Text2skin-skin creation#Colors|Color]] of the background
* center
* right
* left
| Alignment of the text
|-
|-
| mark || STRING || [[Text2skin-skin creation#Colors|Color]] of the cutting marks
| font || STRING || [[Text2skin-skin creation#True-type Fonts|Fontname]]
|-
| active || STRING || [[Text2skin-skin creation#Colors|Color]] of the active area
|-
| keep || STRING || [[Text2skin-skin creation#Colors|Color]] of the video area to keep
|-
| current || NUMBER/TOKEN || Current index value
|-
| total || NUMBER/TOKEN || Maximum index value
|- bgcolor=#efefef
|- bgcolor=#efefef
!Beispiel
!Beispiel
Line 303: Line 335:
|-
|-
|colspan=3|
|colspan=3|
<progress x1="19" x2="556" y1="-17" y2="-7" color="#AF000000" current="{VolumeCurrent}" total="{VolumeTotal}" />
<scrolltext x1="24" y1="138" y2="-72" x2="583" font="helmetr.ttf:20" color="#AFFFFF00">
{PresentShortText}
{PresentDescription}
</scrolltext>
|}
|}


===<scrolltext>===
===<scrollbar>===
A scrollbar.
A multiline text.
{| border=1 cellpadding=2 cellspacing=0 width=100% style="border-collapse:collapse;"
{| border=1 cellpadding=2 cellspacing=0 width=100% style="border-collapse:collapse;"
|- bgcolor=#efefef
|- bgcolor=#efefef
Line 324: Line 359:
| condition || FUNCTION/TOKEN || Complex condition
| condition || FUNCTION/TOKEN || Complex condition
|-
|-
| color || STRING || [[Text2skin-skin creation#Colors|Color]] of the Texte
| color || STRING || [[Text2skin-skin creation#Colors|Color]] of the bar
|-
|-
| bgColor || STRING || [[Text2skin-skin creation#Colors|Color]] of the background
| align ||
* center
* right
* left
| Alignment of the text
|-
| font || STRING || [[Text2skin-skin creation#True-type Fonts|Fontname]]
|- bgcolor=#efefef
|- bgcolor=#efefef
!Beispiel
!Beispiel
Line 339: Line 368:
|-
|-
|colspan=3|
|colspan=3|
<scrolltext x1="24" y1="138" y2="-72" x2="583" font="helmetr.ttf:20" color="#AFFFFF00">
<scrollbar x1="585" x2="608" y1="162" y2="-110" color="#AFFFFF00" bgColor="#8F2B1B9E" />
{PresentShortText}
{PresentDescription}
</scrolltext>
|}
|}


===<scrollbar>===
===<progress>===
A scrollbar.
A progressbar.
{| border=1 cellpadding=2 cellspacing=0 width=100% style="border-collapse:collapse;"
{| border=1 cellpadding=2 cellspacing=0 width=100% style="border-collapse:collapse;"
|- bgcolor=#efefef
|- bgcolor=#efefef
Line 366: Line 392:
|-
|-
| bgColor || STRING || [[Text2skin-skin creation#Colors|Color]] of the background
| bgColor || STRING || [[Text2skin-skin creation#Colors|Color]] of the background
|-
| mark || STRING || [[Text2skin-skin creation#Colors|Color]] of the cutting marks
|-
| active || STRING || [[Text2skin-skin creation#Colors|Color]] of the active area
|-
| keep || STRING || [[Text2skin-skin creation#Colors|Color]] of the video area to keep
|-
| current || NUMBER/TOKEN || Current index value
|-
| total || NUMBER/TOKEN || Maximum index value
|- bgcolor=#efefef
|- bgcolor=#efefef
!Beispiel
!Beispiel
Line 372: Line 408:
|-
|-
|colspan=3|
|colspan=3|
<scrollbar x1="585" x2="608" y1="162" y2="-110" color="#AFFFFF00" bgColor="#8F2B1B9E" />
<progress x1="19" x2="556" y1="-17" y2="-7" color="#AF000000" current="{VolumeCurrent}" total="{VolumeTotal}" />
|}
|}



Revision as of 11:57, 23 December 2004

Hint

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

Warning
Warning

This documentation is in beta state. It is neither complete, not error-less --Monroe 19:52, 17 Dec 2004 (UTC)


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
name NAME Name to display in the VDR-OSD
screenBase "relative","absolute" Should the skin be drawn relative' to the VDR setup of absolute to the coordinates 720x576
Beispiel
<?xml version="1.0"?>
<skin version="1.0" name="brushed Aluminium" screenBase="relative">
  .
  .
  .
</skin>

<display>

For each type of a OSD display a <display>-section is required.

Attribute Value Description
id
  • channelInfo
  • channelSmall
  • volume
  • message
  • replayInfo
  • replaySmall
  • menu
Type of the OSD display
Beispiel
<?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.

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

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

<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)
color STRING
bgColor STRING
path STRING/TOKEN Image file
Beispiel
<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
Beispiel
<text x1="42" x2="571" y1="-113" y2="-86" color="#FF000000" font="Osd">{ReplayTitle}</text>

<text>

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

<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
Beispiel
<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
Beispiel
<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
Beispiel
<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
Beispiel
<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
Beispiel
<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
Beispiel
<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'))