diff options
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | config.c | 2 | ||||
-rw-r--r-- | config.h | 1 | ||||
-rw-r--r-- | menuitem.c | 16 | ||||
-rw-r--r-- | po/ca_ES.po | 11 | ||||
-rw-r--r-- | po/de_DE.po | 11 | ||||
-rw-r--r-- | po/it_IT.po | 11 | ||||
-rw-r--r-- | po/sk_SK.po | 11 | ||||
-rw-r--r-- | setup.c | 4 | ||||
-rw-r--r-- | setup.h | 1 |
10 files changed, 64 insertions, 6 deletions
@@ -298,3 +298,5 @@ Version 0.1.4 - Added additional configurable channel logo cache - Fixed a bug that running instant recording is not displayed in displayChannel +- Configurable Menu Item Scroll Mode: "Carriage Return" or "Forward and + Back again" @@ -66,6 +66,7 @@ cNopacityConfig::cNopacityConfig() { volumeBorderBottom = 10; fontVolume = 0; //DisplayMenu + scrollMode = 0; spaceMenu = 5; widthScrollbar = 20; menuAdjustLeft = 1; @@ -369,6 +370,7 @@ bool cNopacityConfig::SetupParse(const char *Name, const char *Value) { else if (strcmp(Name, "menuInfoTextDelay") == 0) menuInfoTextDelay = atoi(Value); else if (strcmp(Name, "menuInfoScrollDelay") == 0) menuInfoScrollDelay = atoi(Value); else if (strcmp(Name, "menuInfoScrollSpeed") == 0) menuInfoScrollSpeed = atoi(Value); + else if (strcmp(Name, "scrollMode") == 0) scrollMode = atoi(Value); else if (strcmp(Name, "menuAdjustLeft") == 0) menuAdjustLeft = atoi(Value); else if (strcmp(Name, "scalePicture") == 0) scalePicture = atoi(Value); else if (strcmp(Name, "roundedCorners") == 0) roundedCorners = atoi(Value); @@ -95,6 +95,7 @@ class cNopacityConfig { int volumeBorderBottom; int fontVolume; //DisplayMenu + int scrollMode; int spaceMenu; int widthScrollbar; int menuAdjustLeft; @@ -115,6 +115,8 @@ void cNopacityMenuItem::DrawDelimiter(const char *del, const char *icon, eBackgr } void cNopacityMenuItem::Action(void) { + bool carriageReturn = (config.scrollMode == 0) ? true : false; + int scrollDelta = 1; int scrollDelay = config.menuScrollDelay * 1000; DoSleep(scrollDelay); cPixmap::Lock(); @@ -133,11 +135,21 @@ void cNopacityMenuItem::Action(void) { uint64_t Now = cTimeMs::Now(); cPixmap::Lock(); drawPortX = pixmapTextScroller->DrawPort().X(); - drawPortX -= 1; + drawPortX -= scrollDelta; cPixmap::Unlock(); + if (abs(drawPortX) > maxX) { DoSleep(scrollDelay); - drawPortX = 0; + if (carriageReturn) + drawPortX = 0; + else { + scrollDelta *= -1; + drawPortX -= scrollDelta; + } + doSleep = true; + } + if (!carriageReturn && (drawPortX == 0)) { + scrollDelta *= -1; doSleep = true; } cPixmap::Lock(); diff --git a/po/ca_ES.po b/po/ca_ES.po index cfef07f..169eca7 100644 --- a/po/ca_ES.po +++ b/po/ca_ES.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: skinnopacity 0.0.1\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2013-10-03 10:12+0200\n" +"POT-Creation-Date: 2013-10-03 11:10+0200\n" "PO-Revision-Date: 2013-03-19 22:56+0100\n" "Last-Translator: Gabychan <gbonich@gmail.com>\n" "Language-Team: \n" @@ -119,6 +119,12 @@ msgstr "dreta" msgid "left" msgstr "esquerra" +msgid "Carriage Return" +msgstr "" + +msgid "Forward and Back again" +msgstr "" + msgid "off" msgstr "off" @@ -170,6 +176,9 @@ msgstr "Radi dels cantells rodons" msgid "Fade-In Time in ms (Zero for switching off fading)" msgstr "Fosa d'entrada, temps en ms (0 per desactivació)" +msgid "Menu Items Scroll Style" +msgstr "" + msgid "Menu Items Scrolling Speed" msgstr "Velocitat desplaçament elements de menú" diff --git a/po/de_DE.po b/po/de_DE.po index 8addf92..05f5c44 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: skinnopacity 0.0.1\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2013-10-03 10:12+0200\n" +"POT-Creation-Date: 2013-10-03 11:10+0200\n" "PO-Revision-Date: 2012-11-11 17:49+0200\n" "Last-Translator: louis\n" "Language-Team: \n" @@ -116,6 +116,12 @@ msgstr "rechts" msgid "left" msgstr "links" +msgid "Carriage Return" +msgstr "" + +msgid "Forward and Back again" +msgstr "" + msgid "off" msgstr "aus" @@ -167,6 +173,9 @@ msgstr "Radius der abgerundeten Ecken" msgid "Fade-In Time in ms (Zero for switching off fading)" msgstr "Fade-In Zeit in ms (Null zum Abschalten)" +msgid "Menu Items Scroll Style" +msgstr "" + msgid "Menu Items Scrolling Speed" msgstr "Scroll Geschwindigkeit der Menüelemente" diff --git a/po/it_IT.po b/po/it_IT.po index 81c2940..382f810 100644 --- a/po/it_IT.po +++ b/po/it_IT.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: skinnopacity 0.0.1\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2013-10-03 10:12+0200\n" +"POT-Creation-Date: 2013-10-03 11:10+0200\n" "PO-Revision-Date: 2013-03-19 22:56+0100\n" "Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n" "Language-Team: \n" @@ -119,6 +119,12 @@ msgstr "destra" msgid "left" msgstr "sinistra" +msgid "Carriage Return" +msgstr "" + +msgid "Forward and Back again" +msgstr "" + msgid "off" msgstr "disattivo" @@ -170,6 +176,9 @@ msgstr "Raggio angoli smussati" msgid "Fade-In Time in ms (Zero for switching off fading)" msgstr "Tempo comparsa in ms (0 per disattivazione)" +msgid "Menu Items Scroll Style" +msgstr "" + msgid "Menu Items Scrolling Speed" msgstr "Velocità scorrimento voci menu" diff --git a/po/sk_SK.po b/po/sk_SK.po index cd291e1..62a7c3f 100644 --- a/po/sk_SK.po +++ b/po/sk_SK.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: vdr-skinnopacity\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2013-10-03 10:12+0200\n" +"POT-Creation-Date: 2013-10-03 11:10+0200\n" "PO-Revision-Date: 2013-09-16 19:34+0100\n" "Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n" "Language-Team: \n" @@ -116,6 +116,12 @@ msgstr "vpravo" msgid "left" msgstr "vµavo" +msgid "Carriage Return" +msgstr "" + +msgid "Forward and Back again" +msgstr "" + msgid "off" msgstr "vypnuté" @@ -167,6 +173,9 @@ msgstr "Polomer zaoblenia rohov" msgid "Fade-In Time in ms (Zero for switching off fading)" msgstr "èas efektu zmiznutia v ms (nula vypnú»)" +msgid "Menu Items Scroll Style" +msgstr "" + msgid "Menu Items Scrolling Speed" msgstr "Rýchlos» rolovania polo¾iek menu" @@ -131,6 +131,7 @@ void cNopacitySetup::Store(void) { SetupStore("volumeHeight", config.volumeHeight); SetupStore("volumeBorderBottom", config.volumeBorderBottom); SetupStore("fontVolume", config.fontVolume); + SetupStore("scrollMode", config.scrollMode); SetupStore("menuAdjustLeft", config.menuAdjustLeft); SetupStore("scalePicture", config.scalePicture); SetupStore("roundedCorners", config.roundedCorners); @@ -273,6 +274,8 @@ eOSState cMenuSetupSubMenu::ProcessKey(eKeys Key) { cNopacitySetupMenuDisplay::cNopacitySetupMenuDisplay(cNopacityConfig* data) : cMenuSetupSubMenu(tr("VDR Menu: Common Settings"), data) { adjustLeft[0] = tr("right"); adjustLeft[1] = tr("left"); + scrollMode[0] = tr("Carriage Return"); + scrollMode[1] = tr("Forward and Back again"); scrollSpeed[0] = tr("off"); scrollSpeed[1] = tr("slow"); scrollSpeed[2] = tr("medium"); @@ -297,6 +300,7 @@ void cNopacitySetupMenuDisplay::Set(void) { if (tmpNopacityConfig->roundedCorners) Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Radius of rounded corners")), &tmpNopacityConfig->cornerRadius, 5, 30)); Add(new cMenuEditIntItem(tr("Fade-In Time in ms (Zero for switching off fading)"), &tmpNopacityConfig->menuFadeTime, 0, 1000)); + Add(new cMenuEditStraItem(tr("Menu Items Scroll Style"), &tmpNopacityConfig->scrollMode, 2, scrollMode)); Add(new cMenuEditStraItem(tr("Menu Items Scrolling Speed"), &tmpNopacityConfig->menuScrollSpeed, 4, scrollSpeed)); Add(new cMenuEditIntItem(tr("Menu Items Scrolling Delay in s"), &tmpNopacityConfig->menuScrollDelay, 0, 3)); Add(new cMenuEditIntItem(tr("Adjust Font Size - Header"), &tmpNopacityConfig->fontHeader, -20, 20)); @@ -31,6 +31,7 @@ class cMenuSetupSubMenu : public cOsdMenu { class cNopacitySetupMenuDisplay : public cMenuSetupSubMenu { protected: const char *adjustLeft[2]; + const char *scrollMode[2]; const char *scrollSpeed[4]; const char *scalePic[3]; void Set(void); |