1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed displaying messages in the LCARS skin

This commit is contained in:
Klaus Schmidinger 2012-06-13 10:19:15 +02:00
parent 13ee94de2c
commit a8dc76a8ac
2 changed files with 36 additions and 19 deletions

View File

@ -7148,7 +7148,7 @@ Video Disk Recorder Revision History
caching the information whether a recording is stored on the video directory file caching the information whether a recording is stored on the video directory file
system within the cRecording data (based on a patch from Torsten Lang). system within the cRecording data (based on a patch from Torsten Lang).
2012-06-10: Version 1.7.29 2012-06-13: Version 1.7.29
- Added a missing template specification to the c'tor of cSortedTimers (thanks to Udo - Added a missing template specification to the c'tor of cSortedTimers (thanks to Udo
Richter). Richter).
@ -7182,3 +7182,4 @@ Video Disk Recorder Revision History
- Setting the "broken link" or "TEI" flags when cutting recordings is now suppressed - Setting the "broken link" or "TEI" flags when cutting recordings is now suppressed
if the editing point merges two seamlessly fitting parts of the same stream (thanks if the editing point merges two seamlessly fitting parts of the same stream (thanks
to Torsten Lang). to Torsten Lang).
- Fixed displaying messages in the LCARS skin.

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: skinlcars.c 2.11 2012/06/12 13:15:53 kls Exp $ * $Id: skinlcars.c 2.12 2012/06/13 10:12:09 kls Exp $
*/ */
// "Star Trek: The Next Generation"(R) is a registered trademark of Paramount Pictures, // "Star Trek: The Next Generation"(R) is a registered trademark of Paramount Pictures,
@ -548,14 +548,30 @@ void cSkinLCARSDisplayChannel::SetEvents(const cEvent *Present, const cEvent *Fo
void cSkinLCARSDisplayChannel::SetMessage(eMessageType Type, const char *Text) void cSkinLCARSDisplayChannel::SetMessage(eMessageType Type, const char *Text)
{ {
if (Text) { if (Text) {
int y0 = yc11 - ShowSeenExtent; int x0, x1, y0, y1, y2;
int y1 = yc11; if (withInfo) {
osd->SaveRegion(xc06, y0, xc13 - 1, yc12 - 1); x0 = xc06;
osd->DrawRectangle(xc06, y0, xc07, y1 - 1, Theme.Color(clrBackground)); // clears the "seen" bar x1 = xc13;
osd->DrawText(xc06, yc11, Text, Theme.Color(clrMessageStatusFg + 2 * Type), Theme.Color(clrMessageStatusBg + 2 * Type), cFont::GetFont(fontSml), xc13 - xc06, yc12 - yc11, taCenter); y0 = yc11 - ShowSeenExtent;
y1 = yc11;
y2 = yc12;
} }
else else {
x0 = xc03;
x1 = xc13;
y0 = y1 = yc00;
y2 = yc02;
}
osd->SaveRegion(x0, y0, x1 - 1, y2 - 1);
if (withInfo)
osd->DrawRectangle(xc06, y0, xc07, y1 - 1, Theme.Color(clrBackground)); // clears the "seen" bar
osd->DrawText(x0, y1, Text, Theme.Color(clrMessageStatusFg + 2 * Type), Theme.Color(clrMessageStatusBg + 2 * Type), cFont::GetFont(fontSml), x1 - x0, y2 - y1, taCenter);
message = true;
}
else {
osd->RestoreRegion(); osd->RestoreRegion();
message = false;
}
} }
void cSkinLCARSDisplayChannel::Flush(void) void cSkinLCARSDisplayChannel::Flush(void)
@ -566,7 +582,6 @@ void cSkinLCARSDisplayChannel::Flush(void)
DrawTrack(); DrawTrack();
DrawDevice(); DrawDevice();
DrawSignal(); DrawSignal();
}
int Current = 0; int Current = 0;
int Total = 0; int Total = 0;
if (present) { if (present) {
@ -577,6 +592,7 @@ void cSkinLCARSDisplayChannel::Flush(void)
} }
DrawSeen(Current, Total); DrawSeen(Current, Total);
} }
}
osd->Flush(); osd->Flush();
initial = false; initial = false;
} }
@ -1801,7 +1817,7 @@ void cSkinLCARSDisplayReplay::SetMessage(eMessageType Type, const char *Text)
{ {
if (Text) { if (Text) {
osd->SaveRegion(xp06, yp08, xp13 - 1, yp09 - 1); osd->SaveRegion(xp06, yp08, xp13 - 1, yp09 - 1);
osd->DrawText(xp06, yp08, Text, Theme.Color(clrMessageStatusFg + 2 * Type), Theme.Color(clrMessageStatusBg + 2 * Type), cFont::GetFont(fontSml), xp13 - xp06, 0, taCenter); osd->DrawText(xp06, yp08, Text, Theme.Color(clrMessageStatusFg + 2 * Type), Theme.Color(clrMessageStatusBg + 2 * Type), cFont::GetFont(fontSml), xp13 - xp06, yp09 - yp08, taCenter);
} }
else else
osd->RestoreRegion(); osd->RestoreRegion();
@ -2089,7 +2105,7 @@ void cSkinLCARSDisplayMessage::SetMessage(eMessageType Type, const char *Text)
osd->DrawRectangle(x0, y0, x1 - 1, y1 - 1, clrTransparent); osd->DrawRectangle(x0, y0, x1 - 1, y1 - 1, clrTransparent);
osd->DrawEllipse (x0, y0, x1 - 1, y1 - 1, ColorBg, 7); osd->DrawEllipse (x0, y0, x1 - 1, y1 - 1, ColorBg, 7);
osd->DrawRectangle(x1, y0, x2 - 1, y1 - 1, ColorBg); osd->DrawRectangle(x1, y0, x2 - 1, y1 - 1, ColorBg);
osd->DrawText(x3, y0, Text, ColorFg, ColorBg, cFont::GetFont(fontOsd), x4 - x3, 0, taCenter); osd->DrawText(x3, y0, Text, ColorFg, ColorBg, cFont::GetFont(fontSml), x4 - x3, y1 - y0, taCenter);
osd->DrawRectangle(x5, y0, x6 - 1, y1 - 1, ColorBg); osd->DrawRectangle(x5, y0, x6 - 1, y1 - 1, ColorBg);
osd->DrawRectangle(x6, y0, x7 - 1, y1 - 1, clrTransparent); osd->DrawRectangle(x6, y0, x7 - 1, y1 - 1, clrTransparent);
osd->DrawEllipse (x6, y0, x7 - 1, y1 - 1, ColorBg, 5); osd->DrawEllipse (x6, y0, x7 - 1, y1 - 1, ColorBg, 5);