summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorTobias Grimm <tobias@e-tobi.loc>2008-12-31 23:14:08 +0100
committerTobias Grimm <tobias@e-tobi.loc>2008-12-31 23:14:08 +0100
commit159b3865b49b6b0cb5a8623ec7b3ca57019407fe (patch)
treee77ab67e1caf0f51545cac389fe649bae50d3ec5 /menu.c
parent34d0891d83009de75e5788ae5e11865f4f3cb8b5 (diff)
downloadvdr-plugin-osdteletext-159b3865b49b6b0cb5a8623ec7b3ca57019407fe.tar.gz
vdr-plugin-osdteletext-159b3865b49b6b0cb5a8623ec7b3ca57019407fe.tar.bz2
Background toggling now allows to switch between black, the configured background transparency and full transparency as suggested by Walter K. (Closes #41)
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/menu.c b/menu.c
index 69e77f0..3e55964 100644
--- a/menu.c
+++ b/menu.c
@@ -310,10 +310,7 @@ void TeletextBrowser::ExecuteAction(eTeletextAction e) {
//suspendedReceiving=(!suspendedReceiving);
break;*/
case DarkScreen:
- if (Display::GetBackgroundColor() == clrBlack)
- Display::SetBackgroundColor((tColor)ttSetup.configuredClrBackground);
- else
- Display::SetBackgroundColor(clrBlack);
+ ChangeBackground();
break;
default:
//In osdteletext.c, numbers are thought to be decimal, the setup page
@@ -339,6 +336,16 @@ void TeletextBrowser::ExecuteAction(eTeletextAction e) {
}
}
+void TeletextBrowser::ChangeBackground()
+{
+ if (Display::GetBackgroundColor() == clrBlack)
+ Display::SetBackgroundColor((tColor)ttSetup.configuredClrBackground);
+ else if (Display::GetBackgroundColor() == (tColor)ttSetup.configuredClrBackground)
+ Display::SetBackgroundColor(clrTransparent);
+ else
+ Display::SetBackgroundColor(clrBlack);
+}
+
eTeletextAction TeletextBrowser::TranslateKey(eKeys Key) {
switch(Key) {
case kRed: return (eTeletextAction)ttSetup.mapKeyToAction[ActionKeyRed];