diff options
| author | Ville Skyttä <ville.skytta@iki.fi> | 2009-01-11 14:16:56 +0200 |
|---|---|---|
| committer | Ville Skyttä <ville.skytta@iki.fi> | 2009-01-11 14:16:56 +0200 |
| commit | 18ee548cd1bf401be27346bb5aab66cade7da074 (patch) | |
| tree | 4520e5c6ce8178a54d415557400c4ad1bda3244a | |
| parent | 0ad587f0d36bf12c1a80cee0131b4865c7de502d (diff) | |
| download | vdr-plugin-osdteletext-18ee548cd1bf401be27346bb5aab66cade7da074.tar.gz vdr-plugin-osdteletext-18ee548cd1bf401be27346bb5aab66cade7da074.tar.bz2 | |
If background is configured to completely black or transparent, toggle between black and transparent only.
| -rw-r--r-- | HISTORY | 2 | ||||
| -rw-r--r-- | menu.c | 21 |
2 files changed, 18 insertions, 5 deletions
@@ -5,6 +5,8 @@ VDR Plugin 'osdteletext' Revision History - More refactoring of the TxtStatus class (Thx to Sören Moch!) - Install plug-in to lib dir with --remove-destination as suggested by Christian Wieninger (Closes #57) +- If background is configured to completely black or transparent, + toggle between black and transparent only. 2009-01-10: version 0.8.1 - Small bugfix in channel switching code @@ -336,13 +336,24 @@ void TeletextBrowser::ExecuteAction(eTeletextAction e) { } } +// 3-state toggling between configured->transparent->black. +// If configured is black or transparent, do 2-state transparent->black only. void TeletextBrowser::ChangeBackground() { - if (Display::GetBackgroundColor() == clrBlack) - Display::SetBackgroundColor((tColor)ttSetup.configuredClrBackground); - else if (Display::GetBackgroundColor() == (tColor)ttSetup.configuredClrBackground) - Display::SetBackgroundColor(clrTransparent); - else + tColor clrConfig = (tColor)ttSetup.configuredClrBackground; + tColor clrCurrent = Display::GetBackgroundColor(); + + if (clrCurrent == clrConfig) + if (clrConfig == clrTransparent) + Display::SetBackgroundColor(clrBlack); + else + Display::SetBackgroundColor(clrTransparent); + else if (clrCurrent == clrBlack) + if (clrConfig == clrBlack) + Display::SetBackgroundColor(clrTransparent); + else + Display::SetBackgroundColor(clrConfig); + else // clrCurrent == clrTransparent Display::SetBackgroundColor(clrBlack); } |
