summaryrefslogtreecommitdiff
path: root/skinclassic.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2012-09-09 14:37:15 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2012-09-09 14:37:15 +0200
commiteb8fbeba27db8d3c88d321ee60c3ac503b85db2c (patch)
tree01af642698496afcc89d3888fa884a6eac463742 /skinclassic.c
parent3d60eba129caad4af084340a8466a96a6050e69e (diff)
downloadvdr-eb8fbeba27db8d3c88d321ee60c3ac503b85db2c.tar.gz
vdr-eb8fbeba27db8d3c88d321ee60c3ac503b85db2c.tar.bz2
Implemented the setup options "OSD/Color key [0123]"1.7.30
Diffstat (limited to 'skinclassic.c')
-rw-r--r--skinclassic.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/skinclassic.c b/skinclassic.c
index 64944ded..9aac095c 100644
--- a/skinclassic.c
+++ b/skinclassic.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: skinclassic.c 2.7 2012/04/23 08:48:03 kls Exp $
+ * $Id: skinclassic.c 2.8 2012/09/09 11:39:06 kls Exp $
*/
#include "skinclassic.h"
@@ -291,16 +291,19 @@ void cSkinClassicDisplayMenu::SetTitle(const char *Title)
void cSkinClassicDisplayMenu::SetButtons(const char *Red, const char *Green, const char *Yellow, const char *Blue)
{
const cFont *font = cFont::GetFont(fontOsd);
+ const char *lutText[] = { Red, Green, Yellow, Blue };
+ tColor lutFg[] = { clrButtonRedFg, clrButtonGreenFg, clrButtonYellowFg, clrButtonBlueFg };
+ tColor lutBg[] = { clrButtonRedBg, clrButtonGreenBg, clrButtonYellowBg, clrButtonBlueBg };
int w = x3 - x0;
int t0 = x0;
int t1 = x0 + w / 4;
int t2 = x0 + w / 2;
int t3 = x3 - w / 4;
int t4 = x3;
- osd->DrawText(t0, y4, Red, Theme.Color(clrButtonRedFg), Red ? Theme.Color(clrButtonRedBg) : Theme.Color(clrBackground), font, t1 - t0, 0, taCenter);
- osd->DrawText(t1, y4, Green, Theme.Color(clrButtonGreenFg), Green ? Theme.Color(clrButtonGreenBg) : Theme.Color(clrBackground), font, t2 - t1, 0, taCenter);
- osd->DrawText(t2, y4, Yellow, Theme.Color(clrButtonYellowFg), Yellow ? Theme.Color(clrButtonYellowBg) : Theme.Color(clrBackground), font, t3 - t2, 0, taCenter);
- osd->DrawText(t3, y4, Blue, Theme.Color(clrButtonBlueFg), Blue ? Theme.Color(clrButtonBlueBg) : Theme.Color(clrBackground), font, t4 - t3, 0, taCenter);
+ osd->DrawText(t0, y4, lutText[Setup.ColorKey0], Theme.Color(lutFg[Setup.ColorKey0]), lutText[Setup.ColorKey0] ? Theme.Color(lutBg[Setup.ColorKey0]) : Theme.Color(clrBackground), font, t1 - t0, 0, taCenter);
+ osd->DrawText(t1, y4, lutText[Setup.ColorKey1], Theme.Color(lutFg[Setup.ColorKey1]), lutText[Setup.ColorKey1] ? Theme.Color(lutBg[Setup.ColorKey1]) : Theme.Color(clrBackground), font, t2 - t1, 0, taCenter);
+ osd->DrawText(t2, y4, lutText[Setup.ColorKey2], Theme.Color(lutFg[Setup.ColorKey2]), lutText[Setup.ColorKey2] ? Theme.Color(lutBg[Setup.ColorKey2]) : Theme.Color(clrBackground), font, t3 - t2, 0, taCenter);
+ osd->DrawText(t3, y4, lutText[Setup.ColorKey3], Theme.Color(lutFg[Setup.ColorKey3]), lutText[Setup.ColorKey3] ? Theme.Color(lutBg[Setup.ColorKey3]) : Theme.Color(clrBackground), font, t4 - t3, 0, taCenter);
}
void cSkinClassicDisplayMenu::SetMessage(eMessageType Type, const char *Text)