vdr-plugin-skindesigner/views/displaymessageview.c

40 lines
1.1 KiB
C
Raw Normal View History

2014-09-27 09:25:14 +02:00
#define __STL_CONFIG_H
#include <vdr/menu.h>
#include "displaymessageview.h"
cDisplayMessageView::cDisplayMessageView(cTemplateView *tmplView) : cView(tmplView) {
DeleteOsdOnExit();
}
cDisplayMessageView::~cDisplayMessageView() {
}
bool cDisplayMessageView::createOsd(void) {
cRect osdSize = tmplView->GetOsdSize();
bool ok = CreateOsd(cOsd::OsdLeft() + osdSize.X(),
cOsd::OsdTop() + osdSize.Y(),
osdSize.Width(),
osdSize.Height());
2015-03-12 17:28:35 +01:00
if (!ok) {
DeleteOsdOnExit(false);
}
2014-09-27 09:25:14 +02:00
return ok;
}
void cDisplayMessageView::DrawBackground(void) {
map < string, string > stringTokens;
map < string, int > intTokens;
DrawViewElement(veBackground, &stringTokens, &intTokens);
}
void cDisplayMessageView::DrawMessage(eMessageType type, const char *text) {
map < string, string > stringTokens;
map < string, int > intTokens;
SetMenuMessage(type, text, stringTokens, intTokens);
2014-09-27 09:25:14 +02:00
DrawViewElement(veMessage, &stringTokens, &intTokens);
}
void cDisplayMessageView::ClearMessage(void) {
ClearViewElement(veMessage);
}