diff options
-rw-r--r-- | HISTORY | 3 | ||||
-rw-r--r-- | menu.c | 15 | ||||
-rw-r--r-- | menu.h | 2 |
3 files changed, 16 insertions, 4 deletions
@@ -10,6 +10,9 @@ VDR Plugin 'osdteletext' Revision History - Remove remnants of VDR < 1.6 support - Updated Russian translation provided by Oleg Roitburd (Closes #46) - Improved error handling +- Background toggling now allows to switch between black, the configured + background transparency and full transparency as suggested by + Walter K. (Closes #41) 2008-12-19: version 0.7.0 - switched completely to VDR 1.6's I18N system and removed the old crap - no @@ -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]; @@ -75,6 +75,8 @@ protected: static tChannelID channel; static int currentChannelNumber; static TeletextBrowser* self; +private: + void ChangeBackground(); }; |