mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 15:58:31 +00:00
refresh custom token display with each custom token change
This commit is contained in:
@@ -556,10 +556,18 @@ void cDisplayChannelView::DrawCustomTokens(void) {
|
||||
} else {
|
||||
map < string, string > stringTokens = tmplView->GetCustomStringTokens();
|
||||
map < string, int > intTokens = tmplView->GetCustomIntTokens();
|
||||
ClearViewElement(veCustomTokens);
|
||||
DrawViewElement(veCustomTokens, &stringTokens, &intTokens);
|
||||
}
|
||||
}
|
||||
|
||||
bool cDisplayChannelView::CustomTokenChange(void) {
|
||||
if (!tmplView)
|
||||
return false;
|
||||
return tmplView->CustomTokenChange();
|
||||
}
|
||||
|
||||
|
||||
void cDisplayChannelView::DrawCurrentWeather(void) {
|
||||
if (!ExecuteViewElement(veCurrentWeather)) {
|
||||
return;
|
||||
|
@@ -49,6 +49,7 @@ public:
|
||||
void ClearChannelGroups(void);
|
||||
void DisplayMessage(eMessageType Type, const char *Text);
|
||||
void DrawCustomTokens(void);
|
||||
bool CustomTokenChange(void);
|
||||
void DrawCurrentWeather(void);
|
||||
void DoStart(void) { Start(); };
|
||||
void Flush(void) { DoFlush(); };
|
||||
|
@@ -293,7 +293,6 @@ void cDisplayMenuMainView::DrawStaticViewElements(void) {
|
||||
DrawTemperatures();
|
||||
DrawCurrentSchedule();
|
||||
DrawCurrentWeather();
|
||||
DrawCustomTokens();
|
||||
}
|
||||
|
||||
bool cDisplayMenuMainView::DrawDynamicViewElements(void) {
|
||||
@@ -301,9 +300,9 @@ bool cDisplayMenuMainView::DrawDynamicViewElements(void) {
|
||||
bool memChanged = DrawMemory();
|
||||
bool vdrChanged = DrawVdrStats();
|
||||
bool devicesChanged = DrawDevices();
|
||||
bool customTokensChanged = DrawCustomTokens();
|
||||
initial = false;
|
||||
return loadChanged || memChanged || vdrChanged || devicesChanged;
|
||||
|
||||
return loadChanged || memChanged || vdrChanged || devicesChanged || customTokensChanged;
|
||||
}
|
||||
|
||||
void cDisplayMenuMainView::DrawTimers(void) {
|
||||
@@ -588,12 +587,15 @@ void cDisplayMenuMainView::DrawCurrentWeather(void) {
|
||||
}
|
||||
}
|
||||
|
||||
void cDisplayMenuMainView::DrawCustomTokens(void) {
|
||||
bool cDisplayMenuMainView::DrawCustomTokens(void) {
|
||||
if (!ExecuteViewElement(veCustomTokens)) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
if (!tmplView)
|
||||
return;
|
||||
return false;
|
||||
|
||||
if (!initial && !tmplView->CustomTokenChange())
|
||||
return false;
|
||||
|
||||
if (DetachViewElement(veCustomTokens)) {
|
||||
cViewElement *viewElement = GetViewElement(veCustomTokens);
|
||||
@@ -608,8 +610,10 @@ void cDisplayMenuMainView::DrawCustomTokens(void) {
|
||||
} else {
|
||||
map < string, string > stringTokens = tmplView->GetCustomStringTokens();
|
||||
map < string, int > intTokens = tmplView->GetCustomIntTokens();
|
||||
ClearViewElement(veCustomTokens);
|
||||
DrawViewElement(veCustomTokens, &stringTokens, &intTokens);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
|
@@ -62,7 +62,7 @@ private:
|
||||
bool DrawDevices(void);
|
||||
void DrawCurrentSchedule(void);
|
||||
void DrawCurrentWeather(void);
|
||||
void DrawCustomTokens(void);
|
||||
bool DrawCustomTokens(void);
|
||||
public:
|
||||
cDisplayMenuMainView(cTemplateView *tmplView, bool menuInit, string currentRecording);
|
||||
virtual ~cDisplayMenuMainView();
|
||||
|
@@ -457,9 +457,16 @@ void cDisplayReplayView::DrawCustomTokens(void) {
|
||||
return;
|
||||
map < string, string > stringTokens = tmplView->GetCustomStringTokens();
|
||||
map < string, int > intTokens = tmplView->GetCustomIntTokens();
|
||||
ClearViewElement(veCustomTokens);
|
||||
DrawViewElement(veCustomTokens, &stringTokens, &intTokens);
|
||||
}
|
||||
|
||||
bool cDisplayReplayView::CustomTokenChange(void) {
|
||||
if (!tmplView)
|
||||
return false;
|
||||
return tmplView->CustomTokenChange();
|
||||
}
|
||||
|
||||
/****************************************************************************************
|
||||
* Private Functions
|
||||
*****************************************************************************************/
|
||||
|
@@ -44,6 +44,7 @@ public:
|
||||
void ClearOnPause(void);
|
||||
void DelayOnPause(void);
|
||||
void DrawCustomTokens(void);
|
||||
bool CustomTokenChange(void);
|
||||
void DoFadeIn(void) { Start(); };
|
||||
void Flush(void) { DoFlush(); };
|
||||
};
|
||||
|
Reference in New Issue
Block a user