summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlordjaxom <lordjaxom>2004-05-23 19:29:12 +0000
committerlordjaxom <lordjaxom>2004-05-23 19:29:12 +0000
commit377ef2b18a6499a1ef0e540a74c4e54317efee85 (patch)
tree211342fe01d961a9fd621dce45b2672c520c49c5
parentd309055320433e5fd899de53dc688d679609e6db (diff)
downloadvdr-plugin-text2skin-377ef2b18a6499a1ef0e540a74c4e54317efee85.tar.gz
vdr-plugin-text2skin-377ef2b18a6499a1ef0e540a74c4e54317efee85.tar.bz2
- added "ChannelSmall" section (apparently VDR doesn't use it)v0.0.1-pre2
- added replay and message items - added a german translation of the SKINS document (incomplete)
-rw-r--r--HISTORY8
-rw-r--r--SKINS49
-rw-r--r--SKINS.de255
-rw-r--r--data.c23
-rw-r--r--data.h10
-rw-r--r--display.c12
-rw-r--r--render.c97
-rw-r--r--render.h13
-rw-r--r--text2skin.c4
9 files changed, 425 insertions, 46 deletions
diff --git a/HISTORY b/HISTORY
index 57ce90c..7afc64e 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1,6 +1,12 @@
VDR Plugin 'text2skin' Revision History
---------------------------------------
-2004-05-21: Version 0.0.1
+2004-05-23: Version 0.0.1-pre2
+
+- added "ChannelSmall" section
+- added replay and message items
+- added a german translation of the SKINS document (incomplete)
+
+2004-05-23: Version 0.0.1-pre1
- Initial revision.
diff --git a/SKINS b/SKINS
index d1628ca..770f68f 100644
--- a/SKINS
+++ b/SKINS
@@ -15,9 +15,9 @@ holds the skin description file and the needed image files. The skin
description file must have the same name as the skin directory, with the
extension ".skin"
-Example:
-/video0/plugins/text2skin
-/video0/plugins/text2skin/myskin
+Example (the Skin is called myskin):
+/video0/plugins/text2skin/
+/video0/plugins/text2skin/myskin/
/video0/plugins/text2skin/msykin/msykin.skin
/video0/plugins/text2skin/myskin/channeldisplay.png
@@ -40,7 +40,7 @@ Creation of an image
I used gimp to create some test images displaying things on screen, although
I don't know much about image processing :-). To give an advice, I will point
-out how I created those test images with GIMP.
+out how I created those test images.
I've used a template for a menu provided by a community member, tiled it into
sections fully covered by the image. That made three images in this case. Then
@@ -55,8 +55,8 @@ decoration you intend to use. I saved the results to a png file and placed the
result into the skin.
If you intend to use xpm's, be aware that VDR doesn't know about named colors,
-so most images GIMP creates will not be read on-the-fly, because GIMP always
-uses the color "None". [ TODO at least None will be supported by VDR 1.3.8 ]
+so some images GIMP creates will not be read on-the-fly, because GIMP may use
+some named colors, but VDR only recognizes "None".
The Description File Format
@@ -82,6 +82,10 @@ Item=Volumebar,x=10,y=10,width=10,height=100,bg=#FF000000,fg=#FFFFFFFF;
Known Sections
--------------
+Section: [ChannelSmall]
+Description: The channel display. It displays the current programme and number
+ only, together with some decoration.
+
Section: [Channel]
Description: The channel display. It displays the current programme and number,
together with the currently running programme and possibly a
@@ -108,6 +112,7 @@ Description: [ TODO ] Full menu.
Known Items
-----------
+
Item: Item=Skin
Description: This identifies the skin and adds a description to it.
Parameters: name, version
@@ -247,6 +252,34 @@ Item: Item=ReplayTitle
Description: Draws the title of the current replay.
Parameters: x, y, width, height, fg, font, align
+Item: Item=ReplayCurrent
+Description: Draws the current time in the current replay.
+Parameters: x, y, width, height, fg, font, align
+
+Item: Item=ReplayTotal
+Description: Draws the total length of the current replay.
+Parameters: x, y, width, height, fg, font, align
+
+Item: Item=ReplayJump
+Description: Draws the "Jump:" prompt (if present) of the current replay.
+Parameters: x, y, width, height, fg, font, align
+
+Item: Item=MessageStatus
+Description: Draws the current status message (if present).
+Parameters: x, y, width, height, fg, font, align
+
+Item: Item=MessageInfo
+Description: Draws the current info message (if present).
+Parameters: x, y, width, height, fg, font, align
+
+Item: Item=MessageWarning
+Description: Draws the current warning message (if present).
+Parameters: x, y, width, height, fg, font, align
+
+Item: Item=MessageError
+Description: Draws the current error message (if present).
+Parameters: x, y, width, height, fg, font, align
+
Known Parameters
----------------
@@ -269,8 +302,8 @@ Default: not given (sometimes mandatory)
Parameter: bpp
Description: A positive number representing the depth of a background area.
- Possible values are 1, 2, 4 and 8 mapping to 2, 4, 8, 16 and 256
- colors.
+ Possible values are 1, 2, 3, 4 and 8 mapping to 2, 4, 8, 16 and
+ 256 colors.
Default: 4 (16 colors)
Parameter: fg
diff --git a/SKINS.de b/SKINS.de
new file mode 100644
index 0000000..63c7aae
--- /dev/null
+++ b/SKINS.de
@@ -0,0 +1,255 @@
+
+Wie man textbasierte Skins erstellt
+-----------------------------------
+
+Das Skin selbst findet in einem Unterverzeichnis "text2skin" innerhalb des
+"plugins" Verzeichnisses ihres Konfigurationsordners. Das ist normalerweise das
+Videoverzeichnis, wenn beim VDR-Start -c nicht angegeben wurde, sonst eben das
+dort angegebene. Jedes Skin hat dort ein eigenes Verzeichnis, welches die
+Beschreibungsdatei und Bilder enthält. Die Beschreibungsdatei muss den gleichen
+Namen wie das Skin tragen, mit der Dateiendung ".skin".
+
+Beispiel (das Skin heisst myskin):
+/video0/plugins/text2skin/
+/video0/plugins/text2skin/myskin/
+/video0/plugins/text2skin/myskin/myskin.skin
+/video0/plugins/text2skin/myskin/channeldisplay.png
+
+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
+anderen Ausgabegeräten mag es sein, dass diese Limitierungen nicht zutreffen,
+wenn Sie also ein Skin für ein anderes Gerät schreiben möchten, benutzen Sie
+ruhig ein paar mehr Farben, aber denken Sie daran, dass VDR generell maximal
+256 Farben pro Objekt verwalten kann.
+
+Ein Objekt ist als ein bestimmter Bereich definiert, der eine bestimmte
+Farbpalette und Farbtiefe verwendet. Diese Objekte werden im Verlauf dieses
+Dokuments "Backgrounds" genannt. Berechnen sie die Dimensionen dieser Bereiche
+weise, denn überlappende oder übergroße Backgrounds führen zu einem Fehler.
+Zusätzlich muss die Breite und Höhe jedes Backgrounds durch vier teilbar sein.
+
+
+Die Erstellung eines Bildes
+---------------------------
+
+Ich habe mit gimp einige Beispielbilder erstellt, die Dinge auf dem Bildschirm
+anzeigen, obwohl ich mit Grafik eigentlich recht wenig am Hut habe. Um einige
+Hinweise zu geben, werde ich erklären wie ich diese Bilder erzeugt habe.
+
+Ich habe eine Vorlage für ein Kanaldisplay von einem Community-Mitglied
+erhalten, dieses in drei Bereiche zerlegt, die jeweils komplett vom Hintergrund
+gefüllt wurden. Nun habe ich das Bild so vergrößert, dass Breite und Höhe durch
+vier teilbar sind. Um im mittleren Bereich etwas Transparenz zu erzeugen, habe
+ich die Deckkraft der Bildebene auf 50% reduziert. Anschliessend habe ich alle
+Bilder auf 14 Farben reduziert (Bild->Modus->Indiziert) (natürlich darf das
+Bild nicht zu aufwändig sein, aber mit 14 Farben bekommt man schon schöne
+Übergänge hin. Dann bleiben zwei Farben für Text und Symbole übrig, und das
+ganze passt in einen 16-farb (4-bit) Background. Reduzieren sie die Azahl der
+Farben entsprechend, wenn Sie beabsichtigen, mehr Vordergrundobjekte zu
+zeichnen. Das Ergebnis habe ich als PNG gespeichert und in das Skin kopiert.
+
+Wenn sie beabsichtigen, xpm's zu nutzen, achten sie darauf dass VDR keine
+benannten Farben beherrscht, es könnte also sein dass Bilder die gimp erzeugt
+nicht sofort nutzbar sind. Die einzige benannte Farbe, die VDR beherrscht, ist
+"None".
+
+
+Das Format der Beschreibungsdatei
+---------------------------------
+
+Die Datei ist eine einfache Konfigurationsdatei, die aus Sektionen und Objekten
+besteht. Kommentarzeilen können mit einem '#' eingeleitet werden. Leerzeilen
+werden ignoriert. Eine Sektion ist von eckigen '[]' Klammern eingeschlossen.
+Ein Objekt beginnt mit dem Text "Item=", gefolgt von der Art des Objekts.
+Dahinter folgen Parameter für das Objekt, mit Komma getrennt. Die Zeile wird
+durch ein Semikolon ';' abgeschlossen.
+
+Beispiel:
+Item=Skin,name=Test,version=0.0.1;
+[Channel]
+Item=Background,path=channeltop.xpm,x=42,y=350,width=540,height=32,bg=#00FFFFFF;
+Item=Background,path=channel.png,x=48,y=382,width=528,height=84;
+Item=ChannelNumberName,x=50,y=355,fg=#FFFFFFFF,bg=#FF1965FF,font=Sml;
+Item=PresentTime,x=52,y=387,fg=#FFFFFFFF,bg=#7F002254,font=Osd;
+[Volume]
+Item=Background,x=10,y=10,width=10,height=100;
+Item=Volumebar,x=10,y=10,width=10,height=100,bg=#FF000000,fg=#FFFFFFFF;
+
+
+Bekannte Sektionen
+------------------
+
+Sektion: [ChannelSmall]
+ Die Kanalanzeige, die nur aktuellen Kanalnamen und -nummer
+ anzeigt.
+
+Sektion: [Channel]
+Beschreibung: Die Kanalanzeige. Sie zeigt aktuellen Kanalnamen und -nummer,
+ gemeinsam mit dem aktuellen Programm und möglicherweise eine
+ Zeitleiste und ein Kanallogo (noch nicht implementiert).
+
+Sektion: [Volume]
+Beschreibung: Die Lautstärkeanzeige. Zeigt die Lautstärkeleiste und
+ möglicherweise ein Mute-Symbol und etwas Dekoration.
+
+Sektion: [ReplayMode]
+Beschreibung: Die Wiedergabeanzeige. Wird angezeigt wenn nur der
+ Wiedergabemodus gezeigt werden soll.
+
+Sektion: [Replay]
+Beschreibung: [ TODO ] Die große Wiedergabeanzeige
+
+Sektion: [Message]
+Beschreibung: [ TODO ] Anzeige einer Nachricht
+
+Sektion: [Menu]
+Beschreibung: [ TODO ] Vollständiges Menü
+
+
+Bekannte Objekte
+----------------
+
+Objekt: Item=Skin
+Beschreibung: Dieses Objekt identifiziert ein Skin und fügt eine Beschreibung
+ hinzu.
+Parameter: name, version
+
+Objekt: Item=Background
+Parameter: x, y, width, height, bpp, path, bg, fg
+
+Objekt: Item=Text
+Parameter: x, y, text, width, height, fg, font, align
+
+
+Objekt: Item=DateTime
+Parameter: x, y, width, height, fg, font, align
+
+Objekt: Item=Date
+Parameter: x, y, width, height, fg, font, align
+
+Objekt: Item=Time
+Parameter: x, y, width, height, fg, font, align
+
+Objekt: Item=ChannelNumberName
+Parameter: x, y, width, height, fg, font, align
+
+Objekt: Item=ChannelNumber
+Parameter: x, y, width, height, fg, font, align
+
+Objekt: Item=ChannelName
+Parameter: x, y, width, height, fg, font, align
+
+Objekt: Item=Rectangle
+Parameter: x, y, width, height, fg
+
+Objekt: Item=Ellipse
+Parameter: x, y, width, height, fg
+
+Objekt: Item=Timebar
+Parameter: x, y, width, height, fg, bg
+
+Objekt: Item=PresentTime
+Parameter: x, y, width, height, fg, font, align
+
+Objekt: Item=PresentTitle
+Parameter: x, y, width, height, fg, font, align
+
+Objekt: Item=PresentShortText
+Parameter: x, y, width, height, fg, font, align
+
+Objekt: Item=FollowingTime
+Parameter: x, y, width, height, fg, font, align
+
+Objekt: Item=FollowingTitle
+Parameter: x, y, width, height, fg, font, align
+
+Objekt: Item=FollowingShortText
+Parameter: x, y, width, height, fg, font, align
+
+Objekt: Item=SymbolTeletext
+Parameter: x, y, width, height, path, altpath, fg, bg
+
+Objekt: Item=SymbolAudio
+Parameter: x, y, width, height, path, altpath, fg, bg
+
+Objekt: Item=SymbolDolby
+Parameter: x, y, width, height, path, altpath, fg, bg
+
+Objekt: Item=SymbolEncrypted
+Parameter: x, y, width, height, path, altpath, fg, bg
+
+Objekt: Item=Volumebar
+Parameter: x, y, width, height, fg, bg
+
+Objekt: Item=Mute
+Parameter: x, y, width, height, fg, bg, text, font, align, path
+
+Objekt: Item=Progressbar
+Parameter: x, y, width, height, fg, bg
+
+Objekt: Item=ReplayTitle
+Parameter: x, y, width, height, fg, font, align
+
+Objekt: Item=ReplayCurrent
+Parameter: x, y, width, height, fg, font, align
+
+Objekt: Item=ReplayTotal
+Parameter: x, y, width, height, fg, font, align
+
+Objekt: Item=ReplayJump
+Parameter: x, y, width, height, fg, font, align
+
+Objekt: Item=MessageStatus
+Parameter: x, y, width, height, fg, font, align
+
+Objekt: Item=MessageInfo
+Parameter: x, y, width, height, fg, font, align
+
+Objekt: Item=MessageWarning
+Parameter: x, y, width, height, fg, font, align
+
+Objekt: Item=MessageError
+Parameter: x, y, width, height, fg, font, align
+
+
+Bekannte Parameters
+----------------
+
+Parameter: x
+Standard: PFLICHT
+
+Parameter: y
+Standard: PFLICHT
+
+Parameter: width
+Standard: nicht gesetzt (sometimes mandatory)
+
+Parameter: height
+Standard: nicht gesetzt (sometimes mandatory)
+
+Parameter: bpp
+Standard: 4 (16 Farbem)
+
+Parameter: fg
+Standard: nicht gesetzt
+Beispiel: #ff000000
+
+Parameter: bg
+Standard: nicht gesetzt
+
+Parameter: font
+Standard: Osd
+
+Parameter: path
+Standard: nicht gesetzt
+
+Parameter: altpath
+Standard: nicht gesetzt
+
+Parameter: text
+Standard: nicht gesetzt
+
+Parameter: align
+Standard: 0
+
diff --git a/data.c b/data.c
index 8aa6ebc..3e69cd2 100644
--- a/data.c
+++ b/data.c
@@ -1,5 +1,5 @@
/*
- * $Id: data.c,v 1.1.1.1 2004/05/23 00:08:03 lordjaxom Exp $
+ * $Id: data.c,v 1.2 2004/05/23 19:20:26 lordjaxom Exp $
*/
#include "data.h"
@@ -49,12 +49,13 @@ bool cText2SkinItem::Parse(const char *Text) {
else if (*ptr == '[' && ptr[strlen(ptr)-1] == ']') { // section
++ptr;
ptr[strlen(ptr)-1] = '\0';
- if (strcmp(ptr, "Channel") == 0) mParseSection = sectionChannel;
- else if (strcmp(ptr, "Menu") == 0) mParseSection = sectionMenu;
- else if (strcmp(ptr, "Volume") == 0) mParseSection = sectionVolume;
- else if (strcmp(ptr, "ReplayMode") == 0) mParseSection = sectionReplayMode;
- else if (strcmp(ptr, "Replay") == 0) mParseSection = sectionReplay;
- else if (strcmp(ptr, "Message") == 0) mParseSection = sectionMessage;
+ if (strcmp(ptr, "Channel") == 0) mParseSection = sectionChannel;
+ else if (strcmp(ptr, "ChannelSmall") == 0) mParseSection = sectionChannelSmall;
+ else if (strcmp(ptr, "Menu") == 0) mParseSection = sectionMenu;
+ else if (strcmp(ptr, "Volume") == 0) mParseSection = sectionVolume;
+ else if (strcmp(ptr, "ReplayMode") == 0) mParseSection = sectionReplayMode;
+ else if (strcmp(ptr, "Replay") == 0) mParseSection = sectionReplay;
+ else if (strcmp(ptr, "Message") == 0) mParseSection = sectionMessage;
return true;
}
@@ -93,6 +94,14 @@ bool cText2SkinItem::Parse(const char *Text) {
else if (strcmp(item, "Volumebar") == 0) mItem = itemVolumebar;
else if (strcmp(item, "Mute") == 0) mItem = itemMute;
else if (strcmp(item, "Progressbar") == 0) mItem = itemProgressbar;
+ else if (strcmp(item, "ReplayTitle") == 0) mItem = itemReplayTitle;
+ else if (strcmp(item, "ReplayCurrent") == 0) mItem = itemReplayCurrent;
+ else if (strcmp(item, "ReplayTotal") == 0) mItem = itemReplayTotal;
+ else if (strcmp(item, "ReplayJump") == 0) mItem = itemReplayJump;
+ else if (strcmp(item, "MessageStatus") == 0) mItem = itemMessageStatus;
+ else if (strcmp(item, "MessageInfo") == 0) mItem = itemMessageInfo;
+ else if (strcmp(item, "MessageWarning") == 0) mItem = itemMessageWarning;
+ else if (strcmp(item, "MessageError") == 0) mItem = itemMessageError;
else if (strcmp(item, "MenuArea") == 0) mItem = itemMenuArea;
else if (strcmp(item, "MenuItem") == 0) mItem = itemMenuItem;
else if (strcmp(item, "MenuCurrent") == 0) mItem = itemMenuCurrent;
diff --git a/data.h b/data.h
index 69327bc..de1c374 100644
--- a/data.h
+++ b/data.h
@@ -1,5 +1,5 @@
/*
- * $Id: data.h,v 1.1.1.1 2004/05/23 00:08:03 lordjaxom Exp $
+ * $Id: data.h,v 1.2 2004/05/23 19:20:26 lordjaxom Exp $
*/
#ifndef VDR_TEXT2SKIN_DATA_H
@@ -13,6 +13,7 @@
enum eSkinSection {
sectionUnknown,
+ sectionChannelSmall,
sectionChannel,
sectionVolume,
sectionReplayMode,
@@ -50,6 +51,13 @@ enum eSkinItem {
itemMute,
itemProgressbar,
itemReplayTitle,
+ itemReplayCurrent,
+ itemReplayTotal,
+ itemReplayJump,
+ itemMessageStatus,
+ itemMessageInfo,
+ itemMessageWarning,
+ itemMessageError,
itemMenuArea,
itemMenuItem,
itemMenuCurrent
diff --git a/display.c b/display.c
index 395205d..d0079c5 100644
--- a/display.c
+++ b/display.c
@@ -1,5 +1,5 @@
/*
- * $Id: display.c,v 1.1.1.1 2004/05/23 00:08:03 lordjaxom Exp $
+ * $Id: display.c,v 1.2 2004/05/23 19:20:26 lordjaxom Exp $
*/
#include "display.h"
@@ -12,7 +12,7 @@ cText2SkinDisplayChannel::cText2SkinDisplayChannel(cText2SkinData *Data, bool Wi
printf("cText2SkinDisplayChannel\n");
mData = Data;
mWithInfo = WithInfo;
- mRender = new cText2SkinRender(mData, sectionChannel);
+ mRender = new cText2SkinRender(mData, WithInfo ? sectionChannel : sectionChannelSmall);
mDirty = false;
}
@@ -113,9 +113,17 @@ void cText2SkinDisplayReplay::SetProgress(int Current, int Total) {
}
void cText2SkinDisplayReplay::SetCurrent(const char *Current) {
+ if (mRender->mReplayCurrentText != Current) {
+ mRender->mReplayCurrentText = Current;
+ mDirty = true;
+ }
}
void cText2SkinDisplayReplay::SetTotal(const char *Total) {
+ if (mRender->mReplayTotalText != Total) {
+ mRender->mReplayTotalText = Total;
+ mDirty = true;
+ }
}
void cText2SkinDisplayReplay::SetJump(const char *Jump) {
diff --git a/render.c b/render.c
index 0ae8c5d..9c9623a 100644
--- a/render.c
+++ b/render.c
@@ -1,5 +1,5 @@
/*
- * $Id: render.c,v 1.1.1.1 2004/05/23 00:08:03 lordjaxom Exp $
+ * $Id: render.c,v 1.3 2004/05/23 19:20:26 lordjaxom Exp $
*/
#include <vdr/channels.h>
@@ -13,33 +13,35 @@ cText2SkinRender::cText2SkinRender(cText2SkinData *Data, eSkinSection Section) {
tArea areas[MAXOSDAREAS];
int numAreas = 0;
- mData = Data;
- mSection = Section;
- mOsd = cOsdProvider::NewOsd(Setup.OSDLeft, Setup.OSDTop);
- mChannel = NULL;
- mNumber = 0;
- mVolumeCurrent = 0;
- mVolumeTotal = 0;
- mVolumeMute = false;
- mReplayTitle = NULL;
- mReplayPlay = false;
- mReplayForward = false;
- mReplaySpeed = 0;
- mReplayCurrent = 0;
- mReplayTotal = 0;
- mReplayJump = NULL;
- mMessageType = (eMessageType)-1;
- mMessageText = NULL;
- mPresent = NULL;
- mFollowing = NULL;
- mTitle = NULL;
- mCurrent = 0;
+ mData = Data;
+ mSection = Section;
+ mOsd = cOsdProvider::NewOsd(Setup.OSDLeft, Setup.OSDTop);
+ mChannel = NULL;
+ mNumber = 0;
+ mVolumeCurrent = 0;
+ mVolumeTotal = 0;
+ mVolumeMute = false;
+ mReplayTitle = NULL;
+ mReplayPlay = false;
+ mReplayForward = false;
+ mReplaySpeed = 0;
+ mReplayCurrent = 0;
+ mReplayTotal = 0;
+ mReplayCurrentText = NULL;
+ mReplayTotalText = NULL;
+ mReplayJump = NULL;
+ mMessageType = (eMessageType)-1;
+ mMessageText = NULL;
+ mPresent = NULL;
+ mFollowing = NULL;
+ mTitle = NULL;
+ mCurrent = 0;
cText2SkinItem *item;
for (item = Data->First(); item; item = Data->Next(item)) {
if (item->Section() == Section && item->Item() == itemBackground) {
if (numAreas < MAXOSDAREAS) {
- printf("area item: %d:%d:%d:%d\n", item->X(), item->Y(), item->X() + item->Width() - 1, item->Y() + item->Height() - 1, item->Bpp());
+ printf("area item: %d:%d:%d:%d:%d\n", item->X(), item->Y(), item->X() + item->Width() - 1, item->Y() + item->Height() - 1, item->Bpp());
areas[numAreas].x1 = item->X();
areas[numAreas].y1 = item->Y();
areas[numAreas].x2 = item->X() + item->Width() - 1;
@@ -136,6 +138,20 @@ void cText2SkinRender::Flush(void) {
DisplayProgressbar(item); break;
case itemReplayTitle:
DisplayReplayTitle(item); break;
+ case itemReplayCurrent:
+ DisplayReplayCurrent(item); break;
+ case itemReplayTotal:
+ DisplayReplayTotal(item); break;
+ case itemReplayJump:
+ DisplayReplayJump(item); break;
+ case itemMessageInfo:
+ DisplayMessageInfo(item); break;
+ case itemMessageStatus:
+ DisplayMessageStatus(item); break;
+ case itemMessageWarning:
+ DisplayMessageWarning(item); break;
+ case itemMessageError:
+ DisplayMessageError(item); break;
case itemMenuItem:
DisplayMenuItems(item); break;
default:
@@ -344,6 +360,41 @@ void cText2SkinRender::DisplayReplayTitle(cText2SkinItem *Item) {
if (mReplayTitle)
DrawTextTransparent(mOsd, Item->X(), Item->Y(), mReplayTitle, Item->Fg(), Item->Bg(), SkinFont(Item), Item->Width(), Item->Height(), Item->Align());
}
+
+void cText2SkinRender::DisplayReplayCurrent(cText2SkinItem *Item) {
+ if (mReplayCurrentText)
+ DrawTextTransparent(mOsd, Item->X(), Item->Y(), mReplayCurrentText, Item->Fg(), Item->Bg(), SkinFont(Item), Item->Width(), Item->Height(), Item->Align());
+}
+
+void cText2SkinRender::DisplayReplayTotal(cText2SkinItem *Item) {
+ if (mReplayTotalText)
+ DrawTextTransparent(mOsd, Item->X(), Item->Y(), mReplayTotalText, Item->Fg(), Item->Bg(), SkinFont(Item), Item->Width(), Item->Height(), Item->Align());
+}
+
+void cText2SkinRender::DisplayReplayJump(cText2SkinItem *Item) {
+ if (mReplayJump)
+ DrawTextTransparent(mOsd, Item->X(), Item->Y(), mReplayJump, Item->Fg(), Item->Bg(), SkinFont(Item), Item->Width(), Item->Height(), Item->Align());
+}
+
+void cText2SkinRender::DisplayMessageStatus(cText2SkinItem *Item) {
+ if (mMessageType == mtStatus && mMessageText)
+ DrawTextTransparent(mOsd, Item->X(), Item->Y(), mMessageText, Item->Fg(), Item->Bg(), SkinFont(Item), Item->Width(), Item->Height(), Item->Align());
+}
+
+void cText2SkinRender::DisplayMessageInfo(cText2SkinItem *Item) {
+ if (mMessageType == mtInfo && mMessageText)
+ DrawTextTransparent(mOsd, Item->X(), Item->Y(), mMessageText, Item->Fg(), Item->Bg(), SkinFont(Item), Item->Width(), Item->Height(), Item->Align());
+}
+
+void cText2SkinRender::DisplayMessageWarning(cText2SkinItem *Item) {
+ if (mMessageType == mtWarning && mMessageText)
+ DrawTextTransparent(mOsd, Item->X(), Item->Y(), mMessageText, Item->Fg(), Item->Bg(), SkinFont(Item), Item->Width(), Item->Height(), Item->Align());
+}
+
+void cText2SkinRender::DisplayMessageError(cText2SkinItem *Item) {
+ if (mMessageType == mtError && mMessageText)
+ DrawTextTransparent(mOsd, Item->X(), Item->Y(), mMessageText, Item->Fg(), Item->Bg(), SkinFont(Item), Item->Width(), Item->Height(), Item->Align());
+}
void cText2SkinRender::DisplayMenuItems(cText2SkinItem *Item) {
cText2SkinItem *area = mData->Get(itemMenuArea);
diff --git a/render.h b/render.h
index 4b19d47..57ce493 100644
--- a/render.h
+++ b/render.h
@@ -1,14 +1,14 @@
/*
- * $Id: render.h,v 1.1.1.1 2004/05/23 00:08:03 lordjaxom Exp $
+ * $Id: render.h,v 1.3 2004/05/23 19:20:26 lordjaxom Exp $
*/
#ifndef VDR_TEXT2SKIN_RENDER_H
#define VDR_TEXT2SKIN_RENDER_H
+#include <vector>
#include <vdr/osd.h>
#include <vdr/skins.h>
#include "data.h"
-#include <vector>
using std::vector;
@@ -46,6 +46,8 @@ private:
int mReplaySpeed;
int mReplayCurrent;
int mReplayTotal;
+ const char *mReplayCurrentText;
+ const char *mReplayTotalText;
const char *mReplayJump;
// message display
@@ -86,6 +88,13 @@ protected:
void DisplayMute(cText2SkinItem *Item);
void DisplayProgressbar(cText2SkinItem *Item);
void DisplayReplayTitle(cText2SkinItem *Item);
+ void DisplayReplayCurrent(cText2SkinItem *Item);
+ void DisplayReplayTotal(cText2SkinItem *Item);
+ void DisplayReplayJump(cText2SkinItem *Item);
+ void DisplayMessageStatus(cText2SkinItem *Item);
+ void DisplayMessageInfo(cText2SkinItem *Item);
+ void DisplayMessageWarning(cText2SkinItem *Item);
+ void DisplayMessageError(cText2SkinItem *Item);
void DisplayMenuItems(cText2SkinItem *Item);
public:
diff --git a/text2skin.c b/text2skin.c
index 19777aa..c445bc6 100644
--- a/text2skin.c
+++ b/text2skin.c
@@ -3,13 +3,13 @@
*
* See the README file for copyright information and how to reach the author.
*
- * $Id: text2skin.c,v 1.2 2004/05/23 00:23:12 lordjaxom Exp $
+ * $Id: text2skin.c,v 1.3 2004/05/23 19:20:26 lordjaxom Exp $
*/
#include <vdr/plugin.h>
#include "loader.h"
-static const char *VERSION = "0.0.1-pre1";
+static const char *VERSION = "0.0.1-pre2";
static const char *DESCRIPTION = "Loader for text-based skins";
class cText2SkinPlugin : public cPlugin {