clearing displaymessage if it is called without text

This commit is contained in:
louis 2014-11-18 18:33:27 +01:00
parent 5d715edba1
commit e7abb8557e
4 changed files with 9 additions and 1 deletions

View File

@ -86,3 +86,4 @@ Version 0.0.5
- fixed {hasicon} Token in displaymenu header
- added {newmails} Token in displaychannel statusinfo, mailbox plugin
has to be installed
- clearing displaymessage if it is called without text

View File

@ -25,8 +25,10 @@ cSDDisplayMessage::~cSDDisplayMessage() {
void cSDDisplayMessage::SetMessage(eMessageType Type, const char *Text) {
if (!doOutput)
return;
if (!Text)
if (!Text) {
messageView->ClearMessage();
return;
}
messageView->DrawMessage(Type, Text);
}

View File

@ -41,6 +41,10 @@ void cDisplayMessageView::DrawMessage(eMessageType type, const char *text) {
DrawViewElement(veMessage, &stringTokens, &intTokens);
}
void cDisplayMessageView::ClearMessage(void) {
ClearViewElement(veMessage);
}
void cDisplayMessageView::Action(void) {
SetInitFinished();
FadeIn();

View File

@ -13,6 +13,7 @@ public:
bool createOsd(void);
void DrawBackground(void);
void DrawMessage(eMessageType type, const char *text);
void ClearMessage(void);
void DoFadeIn(void) { Start(); };
void Flush(void) { DoFlush(); };
};