diff options
author | Tobias Grimm <tobias@e-tobi.loc> | 2008-12-13 11:02:42 +0100 |
---|---|---|
committer | Tobias Grimm <tobias@e-tobi.loc> | 2008-12-13 11:02:42 +0100 |
commit | e2bcda13cdbcaa85f8b7462977b946b095c8b24a (patch) | |
tree | 6ab1d92cd0a324481b2259d910e68bba707c1f2e /ttxtsubsdisplay.c | |
parent | e5d1aacca2020e63dbaf320ba8b1de61746ad410 (diff) | |
download | vdr-plugin-ttxtsubs-0.0.5pre2.tar.gz vdr-plugin-ttxtsubs-0.0.5pre2.tar.bz2 |
- New featuresv0.0.5pre2
- Text colours can be set and row spacing can be adjusted.
(The usual semitransparent "background" colour appearently
doesn't work with the ElchiAIO patch, don't know why.)
Thanks to Rolf Ahrenberg for the patch!
- ttxtsubs menus can now be translated to different languages.
Thanks to Rolf Ahrenberg for the patch!
English, Finnish and Swedish now included, others are welcome!
- Bugs fixed:
- Information for channels with no teletext at all is now cached
too, making channel switches to such channels faster.
- Note:
- The VDR 1.2.x patch "VDR.patch" is the same as in ttxtsubs 0.0.4b,
and the 0.0.4 and 0.0.3d patch should work equally well - there is
no need to repatch if you previously used any of those.
Diffstat (limited to 'ttxtsubsdisplay.c')
-rw-r--r-- | ttxtsubsdisplay.c | 41 |
1 files changed, 33 insertions, 8 deletions
diff --git a/ttxtsubsdisplay.c b/ttxtsubsdisplay.c index cfb7e88..5bc302b 100644 --- a/ttxtsubsdisplay.c +++ b/ttxtsubsdisplay.c @@ -22,6 +22,11 @@ enum { finished }; +// extra colours +enum eMyDvbColor { + myClrGrey = 0xFF808080 +}; + // -------------------- @@ -336,6 +341,26 @@ enum { TEXTX = 15 }; +static eDvbColor +getcolor(int color) +{ + switch (color) + { + case 0: return clrBlack; + case 1: return clrWhite; + case 2: return clrRed; + case 3: return clrGreen; + case 4: return clrYellow; + case 5: return clrMagenta; + case 6: return clrBlue; + case 7: return clrCyan; + case 8: return (eDvbColor) myClrGrey; + case 9: return clrTransparent; + default: return clrBackground; + } + return clrBackground; +} + void cTtxtSubsDisplay::ShowOSD(void) { int i, y; @@ -388,7 +413,7 @@ void cTtxtSubsDisplay::ShowOSD(void) strcpy(buf[3], "1234567890123456789012345678901234567890"); #endif - y = bottom - SCREENTOP - ROWH - (ROWINCR * (rowcount-1)); + y = bottom - SCREENTOP - ROWH - ((ROWINCR + globals.lineSpacing()) * (rowcount-1)); for(i = 0; i < rowcount; i++) { tWindowHandle wind; int w = 0; @@ -399,8 +424,8 @@ void cTtxtSubsDisplay::ShowOSD(void) //wind = mOsd->Create(0, y, 4, ROWH, 2); //mOsd->Fill(0, y, 4, y + ROWH, clrWhite, wind); //mOsd->Fill(0, y, 4, y + ROWH, clrBackground, wind); - wind = mOsd->Create(0, 575, 4, 1, 2); - mOsd->Fill(0, 574, 4, 575, clrWhite, wind); + wind = mOsd->Create(0, 575, 4, 1, 2, false); + mOsd->Fill(0, 574, 4, 575, getcolor(globals.fgColor()), wind); mOsd->Fill(0, 574, 4, 575, clrTransparent, wind); doneWidthWorkaround = 1; } @@ -418,12 +443,12 @@ void cTtxtSubsDisplay::ShowOSD(void) break; } - wind = mOsd->Create(left, y, w, ROWH, 2); - mOsd->Fill(left, y, left + w, y + ROWH, clrWhite, wind); // needed for dxr3s... - mOsd->Fill(left, y, left + w, y + ROWH, clrBackground, wind); - mOsd->Text(left + TEXTX, y + TEXTY, buf[i], clrWhite, clrBackground, wind); + wind = mOsd->Create(left, y, w, ROWH, 2, false); + mOsd->Fill(left, y, left + w, y + ROWH, getcolor(globals.fgColor()), wind); // needed for dxr3s... + mOsd->Fill(left, y, left + w, y + ROWH, getcolor(globals.bgColor()), wind); + mOsd->Text(left + TEXTX, y + TEXTY, buf[i], getcolor(globals.fgColor()), getcolor(globals.bgColor()), wind); - y += ROWINCR; + y += (ROWINCR + globals.lineSpacing()); } mOsd->Flush(); |