From 3121910dc1267c593d24e39e068bfa91f798603f Mon Sep 17 00:00:00 2001 From: louis Date: Sat, 11 Jan 2014 16:53:23 +0100 Subject: =?UTF-8?q?restructured=20detail=C3=B6ed=20EPG=20View=20that=20tv?= =?UTF-8?q?=20frame=20and=20status=20buttons=20are=20displayed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- footer.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'footer.c') diff --git a/footer.c b/footer.c index 348da30..aa4b12e 100644 --- a/footer.c +++ b/footer.c @@ -54,15 +54,31 @@ void cFooter::drawBlueButton() { DrawButton(*text, theme.Color(clrButtonBlue), theme.Color(clrButtonBlueBorder), oeButtonBlue, positionButtons[3]); } -void cFooter::UpdateGroupButtons(const cChannel *channel) { +void cFooter::UpdateGroupButtons(const cChannel *channel, bool force) { + if (!channel) + return; int group = channelGroups->GetGroup(channel); - if (group != currentGroup) { + if ((group != currentGroup) || force) { currentGroup = group; drawGreenButton(channelGroups->GetPrev(group)); drawYellowButton(channelGroups->GetNext(group)); } } +void cFooter::SetDetailedViewMode(void) { + ClearButton(positionButtons[1]); + ClearButton(positionButtons[2]); +} + +void cFooter::LeaveDetailedViewMode(const cChannel *channel) { + if (tvguideConfig.channelJumpMode == eNumJump) { + drawGreenButton(); + drawYellowButton(); + } else { + UpdateGroupButtons(channel, true); + } +} + void cFooter::SetButtonPositions(void) { for (int i=0; i < 4; i++) { positionButtons[i] = -1; @@ -125,4 +141,9 @@ void cFooter::DrawButton(const char *text, tColor color, tColor borderColor, eOs int textWidth = fontManager.FontButton->Width(text); int textHeight = fontManager.FontButton->Height(); footer->DrawText(cPoint(left + (geoManager.buttonWidth-textWidth)/2, buttonY + (geoManager.buttonHeight-textHeight)/2), text, theme.Color(clrFontButtons), colorTextBack, fontManager.FontButton); +} + +void cFooter::ClearButton(int num) { + int left = num * geoManager.buttonWidth + (2 * num + 1) * geoManager.buttonBorder; + footer->DrawRectangle(cRect(left, buttonY, geoManager.buttonWidth, geoManager.buttonHeight), clrTransparent); } \ No newline at end of file -- cgit v1.2.3