implemented SetTitle in displayreplay

This commit is contained in:
louis 2015-02-01 14:45:33 +01:00
parent e25b679d3c
commit 4168dd5f29
5 changed files with 23 additions and 2 deletions

View File

@ -200,3 +200,4 @@ Version 0.2.1
Version 0.2.2
- added replay onpause view in blackhole skin
- implemented SetTitle() in displayreplay

View File

@ -24,13 +24,19 @@ cSDDisplayReplay::~cSDDisplayReplay() {
}
void cSDDisplayReplay::SetRecording(const cRecording *Recording) {
if (!doOutput)
if (!doOutput || !Recording)
return;
replayView->DrawTitle(Recording);
replayView->DrawRecordingInformation(Recording);
replayView->DrawScraperContent(Recording);
}
void cSDDisplayReplay::SetTitle(const char *Title) {
if (!doOutput || !Title)
return;
replayView->DrawTitle(Title);
}
void cSDDisplayReplay::SetMode(bool Play, bool Forward, int Speed) {
if (!doOutput)
return;

View File

@ -17,7 +17,7 @@ public:
cSDDisplayReplay(cTemplate *replayTemplate, bool ModeOnly);
virtual ~cSDDisplayReplay();
virtual void SetRecording(const cRecording *Recording);
virtual void SetTitle(const char *Title) {};
virtual void SetTitle(const char *Title);
virtual void SetMode(bool Play, bool Forward, int Speed);
virtual void SetProgress(int Current, int Total);
virtual void SetCurrent(const char *Current);

View File

@ -96,6 +96,19 @@ void cDisplayReplayView::DrawTitle(const cRecording *recording) {
DrawViewElement(veRecTitle, &stringTokens, &intTokens);
}
void cDisplayReplayView::DrawTitle(const char *title) {
map < string, string > stringTokens;
map < string, int > intTokens;
stringTokens.insert(pair<string,string>("rectitle", title));
stringTokens.insert(pair<string,string>("recsubtitle", ""));
stringTokens.insert(pair<string,string>("recdate", ""));
stringTokens.insert(pair<string,string>("rectime", ""));
DrawViewElement(veRecTitle, &stringTokens, &intTokens);
}
void cDisplayReplayView::DrawRecordingInformation(const cRecording *recording) {
map < string, string > stringTokens;
map < string, int > intTokens;

View File

@ -22,6 +22,7 @@ public:
void DrawDate(void);
void DrawTime(void);
void DrawTitle(const cRecording *recording);
void DrawTitle(const char *title);
void DrawRecordingInformation(const cRecording *recording);
void DrawScraperContent(const cRecording *recording);
void DrawCurrent(const char *current);