added weather viewelement to metrix main menu

This commit is contained in:
louis
2015-01-14 14:20:22 +01:00
parent 645f625d79
commit 3de7f8f13d
14 changed files with 138 additions and 40 deletions

View File

@@ -237,6 +237,7 @@ void cDisplayMenuMainView::DrawStaticViewElements(void) {
DrawDiscUsage();
DrawTemperatures();
DrawCurrentSchedule();
DrawCurrentWeather();
DrawCustomTokens();
}
@@ -581,6 +582,21 @@ void cDisplayMenuMainView::DrawCurrentSchedule(void) {
DrawViewElement(veCurrentSchedule, &stringTokens, &intTokens);
}
void cDisplayMenuMainView::DrawCurrentWeather(void) {
if (!ViewElementImplemented(veCurrentWeather)) {
return;
}
map < string, string > stringTokens;
map < string, int > intTokens;
if (!SetCurrentWeatherTokens(stringTokens, intTokens)){
ClearViewElement(veCurrentWeather);
return;
}
ClearViewElement(veCurrentWeather);
DrawViewElement(veCurrentWeather, &stringTokens, &intTokens);
}
void cDisplayMenuMainView::DrawCustomTokens(void) {
if (!ViewElementImplemented(veCustomTokens)) {
return;