mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Displaying genre and parental rating in the recording info
This commit is contained in:
parent
708230bee9
commit
3e05217a5f
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: skincurses.c 2.2 2010/01/03 14:08:04 kls Exp $
|
* $Id: skincurses.c 2.3 2010/01/03 14:59:16 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <ncurses.h>
|
#include <ncurses.h>
|
||||||
@ -438,6 +438,10 @@ void cSkinCursesDisplayMenu::SetRecording(const cRecording *Recording)
|
|||||||
snprintf(t, sizeof(t), "%s %s", *DateString(Recording->start), *TimeString(Recording->start));
|
snprintf(t, sizeof(t), "%s %s", *DateString(Recording->start), *TimeString(Recording->start));
|
||||||
ts.Set(osd, 0, y, ScOsdWidth, ScOsdHeight - y - 2, t, &Font, clrYellow, clrBackground);
|
ts.Set(osd, 0, y, ScOsdWidth, ScOsdHeight - y - 2, t, &Font, clrYellow, clrBackground);
|
||||||
y += ts.Height();
|
y += ts.Height();
|
||||||
|
if (Info->GetEvent()->ParentalRating()) {
|
||||||
|
cString buffer = cString::sprintf(" %s ", *Info->GetEvent()->GetParentalRatingString());
|
||||||
|
osd->DrawText(ScOsdWidth - Utf8StrLen(buffer), y, buffer, clrBlack, clrYellow, &Font);
|
||||||
|
}
|
||||||
y += 1;
|
y += 1;
|
||||||
const char *Title = Info->Title();
|
const char *Title = Info->Title();
|
||||||
if (isempty(Title))
|
if (isempty(Title))
|
||||||
@ -448,6 +452,13 @@ void cSkinCursesDisplayMenu::SetRecording(const cRecording *Recording)
|
|||||||
ts.Set(osd, 0, y, ScOsdWidth, ScOsdHeight - y - 2, Info->ShortText(), &Font, clrYellow, clrBackground);
|
ts.Set(osd, 0, y, ScOsdWidth, ScOsdHeight - y - 2, Info->ShortText(), &Font, clrYellow, clrBackground);
|
||||||
y += ts.Height();
|
y += ts.Height();
|
||||||
}
|
}
|
||||||
|
for (int i = 0; Info->GetEvent()->Contents(i); i++) {
|
||||||
|
const char *s = Info->GetEvent()->ContentToString(Info->GetEvent()->Contents(i));
|
||||||
|
if (!isempty(s)) {
|
||||||
|
ts.Set(osd, 0, y, ScOsdWidth, ScOsdHeight - y - 2, s, &Font, clrYellow, clrBackground);
|
||||||
|
y += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
y += 1;
|
y += 1;
|
||||||
if (!isempty(Info->Description())) {
|
if (!isempty(Info->Description())) {
|
||||||
textScroller.Set(osd, 0, y, ScOsdWidth - 2, ScOsdHeight - y - 2, Info->Description(), &Font, clrCyan, clrBackground);
|
textScroller.Set(osd, 0, y, ScOsdWidth - 2, ScOsdHeight - y - 2, Info->Description(), &Font, clrCyan, clrBackground);
|
||||||
|
@ -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: skinclassic.c 2.2 2010/01/03 14:08:17 kls Exp $
|
* $Id: skinclassic.c 2.3 2010/01/03 14:55:10 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "skinclassic.h"
|
#include "skinclassic.h"
|
||||||
@ -386,6 +386,12 @@ void cSkinClassicDisplayMenu::SetRecording(const cRecording *Recording)
|
|||||||
snprintf(t, sizeof(t), "%s %s", *DateString(Recording->start), *TimeString(Recording->start));
|
snprintf(t, sizeof(t), "%s %s", *DateString(Recording->start), *TimeString(Recording->start));
|
||||||
ts.Set(osd, x1, y, x2 - x1, y3 - y, t, font, Theme.Color(clrMenuEventTime), Theme.Color(clrBackground));
|
ts.Set(osd, x1, y, x2 - x1, y3 - y, t, font, Theme.Color(clrMenuEventTime), Theme.Color(clrBackground));
|
||||||
y += ts.Height();
|
y += ts.Height();
|
||||||
|
if (Info->GetEvent()->ParentalRating()) {
|
||||||
|
cString buffer = cString::sprintf(" %s ", *Info->GetEvent()->GetParentalRatingString());
|
||||||
|
const cFont *font = cFont::GetFont(fontSml);
|
||||||
|
int w = font->Width(buffer);
|
||||||
|
osd->DrawText(x3 - w, y, buffer, Theme.Color(clrMenuEventVpsFg), Theme.Color(clrMenuEventVpsBg), font, w);
|
||||||
|
}
|
||||||
y += font->Height();
|
y += font->Height();
|
||||||
const char *Title = Info->Title();
|
const char *Title = Info->Title();
|
||||||
if (isempty(Title))
|
if (isempty(Title))
|
||||||
@ -397,6 +403,14 @@ void cSkinClassicDisplayMenu::SetRecording(const cRecording *Recording)
|
|||||||
ts.Set(osd, x1, y, x2 - x1, y3 - y, Info->ShortText(), font, Theme.Color(clrMenuEventShortText), Theme.Color(clrBackground));
|
ts.Set(osd, x1, y, x2 - x1, y3 - y, Info->ShortText(), font, Theme.Color(clrMenuEventShortText), Theme.Color(clrBackground));
|
||||||
y += ts.Height();
|
y += ts.Height();
|
||||||
}
|
}
|
||||||
|
for (int i = 0; Info->GetEvent()->Contents(i); i++) {
|
||||||
|
const char *s = Info->GetEvent()->ContentToString(Info->GetEvent()->Contents(i));
|
||||||
|
if (!isempty(s)) {
|
||||||
|
const cFont *font = cFont::GetFont(fontSml);
|
||||||
|
ts.Set(osd, x1, y, x2 - x1, y3 - y, s, font, Theme.Color(clrMenuEventShortText), Theme.Color(clrBackground));
|
||||||
|
y += ts.Height();
|
||||||
|
}
|
||||||
|
}
|
||||||
y += font->Height();
|
y += font->Height();
|
||||||
if (!isempty(Info->Description())) {
|
if (!isempty(Info->Description())) {
|
||||||
textScroller.Set(osd, x1, y, x2 - x1, y3 - y, Info->Description(), font, Theme.Color(clrMenuEventDescription), Theme.Color(clrBackground));
|
textScroller.Set(osd, x1, y, x2 - x1, y3 - y, Info->Description(), font, Theme.Color(clrMenuEventDescription), Theme.Color(clrBackground));
|
||||||
|
19
skinsttng.c
19
skinsttng.c
@ -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: skinsttng.c 2.3 2010/01/03 14:08:11 kls Exp $
|
* $Id: skinsttng.c 2.4 2010/01/03 14:51:35 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Star Trek: The Next Generation® is a registered trademark of Paramount Pictures
|
// Star Trek: The Next Generation® is a registered trademark of Paramount Pictures
|
||||||
@ -644,6 +644,15 @@ void cSkinSTTNGDisplayMenu::SetRecording(const cRecording *Recording)
|
|||||||
snprintf(t, sizeof(t), "%s %s", *DateString(Recording->start), *TimeString(Recording->start));
|
snprintf(t, sizeof(t), "%s %s", *DateString(Recording->start), *TimeString(Recording->start));
|
||||||
ts.Set(osd, xl, y, x4 - xl, y4 - y, t, font, Theme.Color(clrMenuEventTime), Theme.Color(clrBackground));
|
ts.Set(osd, xl, y, x4 - xl, y4 - y, t, font, Theme.Color(clrMenuEventTime), Theme.Color(clrBackground));
|
||||||
y += ts.Height();
|
y += ts.Height();
|
||||||
|
if (Info->GetEvent()->ParentalRating()) {
|
||||||
|
cString buffer = cString::sprintf(" %s ", *Info->GetEvent()->GetParentalRatingString());
|
||||||
|
const cFont *font = cFont::GetFont(fontSml);
|
||||||
|
int w = font->Width(buffer);
|
||||||
|
osd->DrawText(x4 - w, y, buffer, Theme.Color(clrMenuEventVps), frameColor, font, w);
|
||||||
|
int yb = y + font->Height();
|
||||||
|
osd->DrawRectangle(x5, y, x6 - 1, yb - 1, frameColor);
|
||||||
|
osd->DrawEllipse (x6, y, x7 - 1, yb - 1, frameColor, 5);
|
||||||
|
}
|
||||||
y += font->Height();
|
y += font->Height();
|
||||||
const char *Title = Info->Title();
|
const char *Title = Info->Title();
|
||||||
if (isempty(Title))
|
if (isempty(Title))
|
||||||
@ -655,6 +664,14 @@ void cSkinSTTNGDisplayMenu::SetRecording(const cRecording *Recording)
|
|||||||
ts.Set(osd, xl, y, x4 - xl, y4 - y, Info->ShortText(), font, Theme.Color(clrMenuEventShortText), Theme.Color(clrBackground));
|
ts.Set(osd, xl, y, x4 - xl, y4 - y, Info->ShortText(), font, Theme.Color(clrMenuEventShortText), Theme.Color(clrBackground));
|
||||||
y += ts.Height();
|
y += ts.Height();
|
||||||
}
|
}
|
||||||
|
for (int i = 0; Info->GetEvent()->Contents(i); i++) {
|
||||||
|
const char *s = Info->GetEvent()->ContentToString(Info->GetEvent()->Contents(i));
|
||||||
|
if (!isempty(s)) {
|
||||||
|
const cFont *font = cFont::GetFont(fontSml);
|
||||||
|
ts.Set(osd, xl, y, x4 - xl, y4 - y, s, font, Theme.Color(clrMenuEventShortText), Theme.Color(clrBackground));
|
||||||
|
y += ts.Height();
|
||||||
|
}
|
||||||
|
}
|
||||||
y += font->Height();
|
y += font->Height();
|
||||||
if (!isempty(Info->Description())) {
|
if (!isempty(Info->Description())) {
|
||||||
int yt = y;
|
int yt = y;
|
||||||
|
Loading…
Reference in New Issue
Block a user