summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorlordjaxom <lordjaxom>2004-06-25 17:54:38 +0000
committerlordjaxom <lordjaxom>2004-06-25 17:54:38 +0000
commitf2a4ea2dc8c0d915e0f2af6f4ec1a228e1e94453 (patch)
treee071f932913f57fa464a7e3cdd5cf774c3a629e5 /contrib
parentde602ae6486b181ec081749a510cfcf15c71c817 (diff)
downloadvdr-plugin-text2skin-f2a4ea2dc8c0d915e0f2af6f4ec1a228e1e94453.tar.gz
vdr-plugin-text2skin-f2a4ea2dc8c0d915e0f2af6f4ec1a228e1e94453.tar.bz2
- on devices capable of full-color OSD, bpp's have no meaning anymorev0.0.7
(but will still work like usual). On such devices, a full-screen 8-bit OSD will be used - new display-item "PresentTextDescription" displays combined ShortText/Description - displaying replay symbols only if information is actually available - exchanged x, y, width, height with x1, y1, x2, y2 coordinates (skin version is now 0.0.3) - coordinates may be negative to respect dynamic OSD settings (negative coordinates give pixels from the right or bottom edge) - added base parameter to Skin item to be able to use full screen in absolute mode - added a script to convert 0.0.2 skins to 0.0.3 - added parsing quoted texts (path="Bla.jpg" etc. will work correctly now) - fixed translator to escape the dollar sign - fixed display of scrollbar (REALLY!) - fixed linkage of libMagick++
Diffstat (limited to 'contrib')
-rw-r--r--contrib/items.doc22
-rwxr-xr-xcontrib/list_items.pl40
-rwxr-xr-xcontrib/skin_to_003.pl23
-rwxr-xr-xcontrib/transform.pl54
4 files changed, 133 insertions, 6 deletions
diff --git a/contrib/items.doc b/contrib/items.doc
index 716f4a2..518eb30 100644
--- a/contrib/items.doc
+++ b/contrib/items.doc
@@ -24,6 +24,14 @@ This is the documentation to the Text2Skin file-format (version 0.0.2).
How To create text-based skins
------------------------------
+If you are using an output driver capable of displaying a full-screen 256 color
+OSD (i.e. an upgraded DVB-card, or plugins like SoftDevice), the plugin will
+detect this and make use of the full-screen area. If you intend to write a skin
+that will only work on such a device, you can skip the section concerning
+backgrounds. However, if you plan to make the skin usable on a usual DVB-card,
+even if you don't use one yourself, you should read the following sections
+carefully.
+
It is important that you understand the limitations of the OSD memory. If there
are too many objects with too many colors defined, VDR will throw an error and
some areas will not be displayed. For other output devices this limitations may
@@ -89,6 +97,8 @@ Item=Skin,name=Test,version=0.0.2;
# Background area to draw on (a background MUST be specified to make items
# drawn on it actually visible!!!), with background picture. Bpp=4 equals 16
# colors
+# APPENDIX: Bpp is useless ff the plugin detects a fullscreen-capable Output
+# device. In that case, this item just draws the background image
Item=Background,path=channeltop.xpm,x=42,y=350,width=540,height=32,bpp=4;
# A second area below the first one, again with 16 colors (make 32 colors
# alltogether)
@@ -113,6 +123,15 @@ END_EN
Wie man textbasierte Skins erstellt
-----------------------------------
+Wenn Sie einen Ausgabetreiber nutzen, der fähig ist, ein 256-Farben Vollbild
+als OSD darzustellen (z.B. eine aufgerüstete DVB-Karte oder Plugins wie
+SoftDevice), wird das Plugin dies erkennen und die volle Bildfläche nutzen.
+Wenn Sie beabsichtigen, ein Skin zu schreiben, welches nur auf solchen Geräten
+funktionieren soll, können Sie die folgenden Sektionen, die die Backgrounds
+betreffen überspringen. Wenn Sie jedoch planen Ihr Skin auch auf normalen
+DVB-Karten nutzbar zu machen, auch wenn Sie selbst eine solche nicht nutzen,
+sollten Sie die folgenden Abschnitte aufmerksam lesen.
+
Es ist wichtig, dass sie die Limitierungen des OSD Speichers verstehen. Wenn
zuviele Objekte mit zuvielen Farben definiert werden, dann wird VDR einen
Fehler ins Log schreiben und einige Bereiche werden nicht angezeigt werden. Bei
@@ -182,6 +201,9 @@ Item=Skin,name=Test,version=0.0.2;
# Hintergrundbereich wo wir drauf zeichnen (so etwas MUSS angegeben werden,
# damit Objekte die darauf gezeichnet werden überhaupt sichtbar werden), mit
# Bild. Bpp=4 entspricht 16 Farben
+# ERGÄNZUNG: Wenn das Plugin eine Fullscreen fähige Ausgabeschnittstelle
+# erkennt, ist bpp bedeutungslos, und der Background wird nur fürs Bild
+# gebraucht
Item=Background,path=channeltop.xpm,x=42,y=350,width=540,height=32,bpp=4;
# Ein zweiter Bereich unter dem ersten, wieder mit 16 Farben (macht 32 Farben
# insgesamt)
diff --git a/contrib/list_items.pl b/contrib/list_items.pl
index ad0fde9..a47803f 100755
--- a/contrib/list_items.pl
+++ b/contrib/list_items.pl
@@ -160,12 +160,40 @@ while (defined($_ = <DAT>)) {
next if /mItem;\s*$/;
/m([\w]+);\s*$/ and do {
$what = lc($1);
- printo i18n("Parameter:"), 15;
- print "$what\n";
- printo i18n("Description:"), 15;
- print "\n";
- printo i18n("Default:"), 15;
- print "\n\n";
+ if ($what eq "pos1") {
+ printo i18n("Parameter:"), 15;
+ print "x1\n";
+ printo i18n("Description:"), 15;
+ print "\n";
+ printo i18n("Default:"), 15;
+ print "\n\n";
+ printo i18n("Parameter:"), 15;
+ print "y1\n";
+ printo i18n("Description:"), 15;
+ print "\n";
+ printo i18n("Default:"), 15;
+ print "\n\n";
+ } elsif ($what eq "pos2") {
+ printo i18n("Parameter:"), 15;
+ print "x2\n";
+ printo i18n("Description:"), 15;
+ print "\n";
+ printo i18n("Default:"), 15;
+ print "\n\n";
+ printo i18n("Parameter:"), 15;
+ print "y2\n";
+ printo i18n("Description:"), 15;
+ print "\n";
+ printo i18n("Default:"), 15;
+ print "\n\n";
+ } else {
+ printo i18n("Parameter:"), 15;
+ print "$what\n";
+ printo i18n("Description:"), 15;
+ print "\n";
+ printo i18n("Default:"), 15;
+ print "\n\n";
+ }
};
}
}
diff --git a/contrib/skin_to_003.pl b/contrib/skin_to_003.pl
new file mode 100755
index 0000000..0f4f88c
--- /dev/null
+++ b/contrib/skin_to_003.pl
@@ -0,0 +1,23 @@
+#!/usr/bin/perl
+
+while (defined($_ = <>)) {
+ $x = 0; $y = 0;
+ $w = 0; $h = 0;
+
+ s/version=0.0.2/version=0.0.3,base=rel/;
+
+ /,x=(\d+)[,;]/ and $x = $1;
+ /,y=(\d+)[,;]/ and $y = $1;
+ /,width=(\d+)[,;]/ and $w = $1;
+ /,height=(\d+)[,;]/ and $h = $1;
+
+ $x2 = $x + $w - 1;
+ $y2 = $y + $h - 1;
+
+ s/,x=$x/,x1=$x/;
+ s/,y=$y/,y1=$y/;
+ s/,width=$w/,x2=$x2/;
+ s/,height=$h/,y2=$y2/;
+
+ print $_;
+}
diff --git a/contrib/transform.pl b/contrib/transform.pl
new file mode 100755
index 0000000..db41183
--- /dev/null
+++ b/contrib/transform.pl
@@ -0,0 +1,54 @@
+#!/usr/bin/perl
+
+if (@ARGV != 2) {
+ die "Usage: $0 <in> <out>";
+}
+
+open DAT, "<$ARGV[0]" or die $!;
+open OUT, ">$ARGV[1]" or die $!;
+
+$| = 1;
+
+system("stty -icanon eol \001");
+
+while (defined($_ = <DAT>)) {
+ /\[(\w+)\]/ and print "\nNew Section: $1\n\n";
+ /^Item=(\w+),/ and do {
+ $i = $1;
+ /,x1=(\d+)[,;]/ and do {
+ $x1 = $1;
+ print "Item $i, x1 (left)? ([l]/r) > ";
+ read STDIN, $c, 1;
+ print "\n";
+ $nx1 = $x1 - 624;
+ s/,x1=$x1/,x1=$nx1/ if $c eq 'r';
+ };
+ /,y1=(\d+)[,;]/ and do {
+ $y1 = $1;
+ print "Item $i, y1 (top)? ([l]/r) > ";
+ read STDIN, $c, 1;
+ print "\n";
+ $ny1 = $y1 - 486;
+ s/,y1=$y1/,y1=$ny1/ if $c eq 'r';
+ };
+ /,x2=(\d+)[,;]/ and do {
+ $x2 = $1;
+ print "Item $i, x2 (right)? ([l]/r) > ";
+ read STDIN, $c, 1;
+ print "\n";
+ $nx2 = $x2 - 624;
+ s/,x2=$x2/,x2=$nx2/ if $c eq 'r';
+ };
+ /,y2=(\d+)[,;]/ and do {
+ $y2 = $1;
+ print "Item $i, y2 (bottom)? ([l]/r) > ";
+ read STDIN, $c, 1;
+ print "\n";
+ $ny2 = $y2 - 486;
+ s/,y2=$y2/,y2=$ny2/ if $c eq 'r';
+ };
+ };
+ print OUT $_;
+}
+
+system("stty icanon eol ^@");