void cSkinSTTNGDisplayReplay::SetTitle(const char *Title) { osd->DrawText(x3 + 5, y0, Title, Theme.Color(clrReplayTitle), frameColor, cFont::GetFont(fontSml), x4 - x3 - 5); }
void cSkinSTTNGDisplayReplay::SetMode(bool Play, bool Forward, int Speed) { if (Speed < -1) Speed = -1; if (Speed > 3) Speed = 3; cBitmap bm(ReplaySymbols[Play][Forward][Speed + 1]); osd->DrawBitmap(x0 + (x1 - x0 - bm.Width()) / 2, y3 + (y4 - y3 - bm.Height()) / 2, bm, Theme.Color(clrReplayMode), frameColor); }
void cSkinSTTNGDisplayMenu::Clear(void) { textScroller.Reset(); osd->DrawRectangle(x1, y3, x7 - 1, y4 - 1, Theme.Color(clrBackground)); }
void cSkinSTTNGDisplayMenu::SetText(const char *Text, bool FixedFont) { textScroller.Set(osd, x3, y3, GetTextAreaWidth(), y4 - y3, Text, GetTextAreaFont(FixedFont), Theme.Color(clrMenuText), Theme.Color(clrBackground)); SetScrollbar(); }
void cSkinSTTNGDisplayMessage::SetMessage(eMessageType Type, const char *Text) { const cFont *font = cFont::GetFont(fontOsd); osd->DrawText(x3, y0, Text, Theme.Color(clrMessageStatusFg + 2 * Type), Theme.Color(clrMessageStatusBg + 2 * Type), font, x4 - x3, 0, taCenter); }
cSkinSTTNGDisplayChannel::cSkinSTTNGDisplayChannel(bool WithInfo) { present = NULL; lastSeen = -1; memset(&lastTrackId, 0, sizeof(lastTrackId)); const cFont *font = cFont::GetFont(fontOsd); withInfo = WithInfo; lineHeight = font->Height(); frameColor = Theme.Color(clrChannelFrame); message = false; if (withInfo) { x0 = 0; x1 = x0 + font->Width("00:00") + 4; x2 = x1 + Roundness; x3 = x2 + Gap; x7 = Setup.OSDWidth; x6 = x7 - lineHeight / 2; x5 = x6 - lineHeight / 2; x4 = x5 - Gap; y0 = 0; y1 = lineHeight; y2 = y1 + Roundness; y3 = y2 + Gap; y4 = y3 + 4 * lineHeight; y5 = y4 + Gap; y6 = y5 + Roundness; y7 = y6 + cFont::GetFont(fontSml)->Height(); int yt = (y0 + y1) / 2; int yb = (y6 + y7) / 2; osd = cOsdProvider::NewOsd(Setup.OSDLeft, Setup.OSDTop + (Setup.ChannelInfoPos ? 0 : Setup.OSDHeight - y7)); tArea Areas[] = { { 0, 0, x7 - 1, y7 - 1, 4 } }; osd->SetAreas(Areas, sizeof(Areas) / sizeof(tArea)); osd->DrawRectangle(x0, y0, x7 - 1, y7 - 1, Theme.Color(clrBackground)); osd->DrawRectangle(x0, y0, x1 - 1, y1 - 1, clrTransparent); osd->DrawRectangle(x0, y6, x1 - 1, y7 - 1, clrTransparent); osd->DrawRectangle(x6, y0, x7 - 1, yt - 1, clrTransparent); osd->DrawRectangle(x6, yb, x7 - 1, y7 - 1, clrTransparent); osd->DrawEllipse (x0, y0, x1 - 1, y1 - 1, frameColor, 2); osd->DrawRectangle(x1, y0, x4 - 1, y1 - 1, frameColor); osd->DrawRectangle(x5, y0, x6 - 1, y1 - 1, frameColor); osd->DrawEllipse (x6, y0, x7 - 1, y1 - 1, frameColor, 5); osd->DrawRectangle(x0, y1, x1 - 1, y2 - 1, frameColor); osd->DrawEllipse (x1, y1, x2 - 1, y2 - 1, frameColor, -2); osd->DrawRectangle(x0, y3, x1 - 1, y4 - 1, frameColor); osd->DrawRectangle(x0, y5, x1 - 1, y6 - 1, frameColor); osd->DrawEllipse (x1, y5, x2 - 1, y6 - 1, frameColor, -3); osd->DrawEllipse (x0, y6, x1 - 1, y7 - 1, frameColor, 3); osd->DrawRectangle(x1, y6, x4 - 1, y7 - 1, frameColor); osd->DrawRectangle(x5, y6, x6 - 1, y7 - 1, frameColor); osd->DrawEllipse (x6, y6, x7 - 1, y7 - 1, frameColor, 5); } else { x0 = 0; x1 = lineHeight / 2; x2 = lineHeight; x3 = x2 + Gap; x7 = Setup.OSDWidth; x6 = x7 - lineHeight / 2; x5 = x6 - lineHeight / 2; x4 = x5 - Gap; y0 = 0; y1 = lineHeight; osd = cOsdProvider::NewOsd(Setup.OSDLeft, Setup.OSDTop + (Setup.ChannelInfoPos ? 0 : Setup.OSDHeight - y1)); tArea Areas[] = { { x0, y0, x7 - 1, y1 - 1, 4 } }; osd->SetAreas(Areas, sizeof(Areas) / sizeof(tArea)); osd->DrawRectangle(x0, y0, x7 - 1, y1 - 1, clrTransparent); osd->DrawEllipse (x0, y0, x1 - 1, y1 - 1, frameColor, 7); osd->DrawRectangle(x1, y0, x2 - 1, y1 - 1, frameColor); osd->DrawRectangle(x5, y0, x6 - 1, y1 - 1, frameColor); osd->DrawEllipse (x6, y0, x7 - 1, y1 - 1, frameColor, 5); } }
void cSkinClassicDisplayReplay::SetJump(const char *Jump) { osd->DrawText(x0 + (x1 - x0) / 4, y2, Jump, Theme.Color(clrReplayModeJump), Theme.Color(clrBackground), cFont::GetFont(fontOsd), (x1 - x0) / 2, 0, taCenter); }
void cSkinClassicDisplayMenu::Clear(void) { textScroller.Reset(); osd->DrawRectangle(x0, y1, x3 - 1, y4 - 1, Theme.Color(clrBackground)); }
void cSkinClassicDisplayReplay::SetProgress(int Current, int Total) { cProgressBar pb(x1 - x0, y2 - y1, Current, Total, marks, Theme.Color(clrReplayProgressSeen), Theme.Color(clrReplayProgressRest), Theme.Color(clrReplayProgressSelected), Theme.Color(clrReplayProgressMark), Theme.Color(clrReplayProgressCurrent)); osd->DrawBitmap(x0, y1, pb); }
void cSkinClassicDisplayReplay::SetTotal(const char *Total) { const cFont *font = cFont::GetFont(fontOsd); int w = font->Width(Total); osd->DrawText(x1 - font->Width(Total), y2, Total, Theme.Color(clrReplayTotal), Theme.Color(clrBackground), font, w); }
void cSkinClassicDisplayReplay::SetTitle(const char *Title) { osd->DrawText(x0, y0, Title, Theme.Color(clrReplayTitle), Theme.Color(clrBackground), cFont::GetFont(fontOsd), x1 - x0); }
void cSkinClassicDisplayMenu::SetText(const char *Text, bool FixedFont) { textScroller.Set(osd, x1, y2, GetTextAreaWidth(), y3 - y2, Text, GetTextAreaFont(FixedFont), Theme.Color(clrMenuText), Theme.Color(clrBackground)); SetTextScrollbar(); }
void cSkinClassicDisplayMenu::SetTitle(const char *Title) { const cFont *font = cFont::GetFont(fontOsd); osd->DrawText(x0, y0, Title, Theme.Color(clrMenuTitleFg), Theme.Color(clrMenuTitleBg), font, x3 - x0 - dateWidth); }
void cSkinSTTNGDisplayReplay::SetProgress(int Current, int Total) { cProgressBar pb(x4 - x3, y4 - y3, Current, Total, marks, Theme.Color(clrReplayProgressSeen), Theme.Color(clrReplayProgressRest), Theme.Color(clrReplayProgressSelected), Theme.Color(clrReplayProgressMark), Theme.Color(clrReplayProgressCurrent)); osd->DrawBitmap(x3, y3, pb); }
void cSkinClassicDisplayMessage::SetMessage(eMessageType Type, const char *Text) { const cFont *font = cFont::GetFont(fontOsd); osd->DrawText(0, 0, Text, Theme.Color(clrMessageStatusFg + 2 * Type), Theme.Color(clrMessageStatusBg + 2 * Type), font, cOsd::OsdWidth(), 0, taCenter); }
void cSkinSTTNGDisplayReplay::SetTotal(const char *Total) { const cFont *font = cFont::GetFont(fontSml); osd->DrawText(x4 - font->Width(Total) - 5, y6, Total, Theme.Color(clrReplayTotal), frameColor, font); }
void cSkinClassicDisplayChannel::SetChannel(const cChannel *Channel, int Number) { osd->DrawRectangle(0, 0, osd->Width() - 1, lineHeight - 1, Theme.Color(clrBackground)); osd->DrawText(TextFrame, 0, ChannelString(Channel, Number), Theme.Color(clrChannelName), Theme.Color(clrBackground), cFont::GetFont(fontOsd)); lastDate = NULL; }