diff options
author | louis <louis.braun@gmx.de> | 2014-01-11 16:53:23 +0100 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2014-01-11 16:53:23 +0100 |
commit | 3121910dc1267c593d24e39e068bfa91f798603f (patch) | |
tree | 2ae630b5655ce7aa2821e6440b4e5056d46d91e3 /footer.c | |
parent | 9b45a5d093ce62a36aef5d48848d8e8c3864e8aa (diff) | |
download | vdr-plugin-tvguide-3121910dc1267c593d24e39e068bfa91f798603f.tar.gz vdr-plugin-tvguide-3121910dc1267c593d24e39e068bfa91f798603f.tar.bz2 |
restructured detailöed EPG View that tv frame and status buttons are displayed
Diffstat (limited to 'footer.c')
-rw-r--r-- | footer.c | 25 |
1 files changed, 23 insertions, 2 deletions
@@ -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 |