restructured detailöed EPG View that tv frame and status buttons are displayed

This commit is contained in:
louis
2014-01-11 16:53:23 +01:00
parent 9b45a5d093
commit 3121910dc1
25 changed files with 118 additions and 103 deletions

View File

@@ -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);
}