From 662dd62488f6f842fe5d940e986f798abe1c7691 Mon Sep 17 00:00:00 2001 From: Andreas Brugger Date: Sat, 19 Nov 2005 12:00:00 +0100 Subject: 2005-11-19: Version 1.1-cvs_ext-0.2 (vdr-text2skin-1.1-cvs_ext-0.2.diff) - removed the previously introduced tokens NextTimerName, NextTimerStart, NextTimerChannel, CurrentRecordingsCount and added tokens for the next 3 timers: CurrentEventsTitle[123], CurrentEventsStartDateTime[123], CurrentEventsStopDateTime[123], CurrentEventsChannelNumber[123], CurrentEventsChannelName[123], CurrentEventsIsRecording[123] - added audio- and video-tokens: PresentLanguageCode, PresentLanguageDescription, PresentVideoAR and implemented the missing code for the Language-token - added tokens for replay: ReplayName, ReplayDateTime, ReplayShortText, ReplayDescription, ReplayLanguageCode, ReplayLanguageDescription, ReplayVideoAR (not activated yet) - additional recording-tokens: RecordingVideoAR, RecordingSize - added a reset for scrolling text (configurable) - included Text2skin.diff from the rotor-plugin --- render.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'render.h') diff --git a/render.h b/render.h index 6797e1a..b0e50cf 100644 --- a/render.h +++ b/render.h @@ -134,6 +134,18 @@ public: static bool ItemColor(const std::string &Color, tColor &Result); static std::string ImagePath(const std::string &Filename); static cxType GetToken(const txToken &Token); + + // update infos + struct tUpdate + { + bool timerConflict; + bool events; + std::string currentItem; + bool resetMarquee; + bool foundFirstItem; + + tUpdate(void) : timerConflict(true), events(true), currentItem(""), resetMarquee(true), foundFirstItem(false) {} + } mUpdate; }; inline void cText2SkinRender::Flush(bool Force) -- cgit v1.2.3 From c1bf83aec2961a4e84dbc1c36042bd985f044a91 Mon Sep 17 00:00:00 2001 From: Andreas Brugger Date: Sat, 4 Feb 2006 11:49:02 +0100 Subject: 2006-02-04: Version 1.1-cvs_ext-0.7 (vdr-text2skin-1.1-cvs_ext-0.7.diff) - changed the routines to determine the next timers - added the possibility to have a scrollbar in every menu - not fully implemented yet (to position in menu-lists is not necessarily correct, if there are more items with the same osd-text) --- render.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'render.h') diff --git a/render.h b/render.h index b0e50cf..4748a0d 100644 --- a/render.h +++ b/render.h @@ -134,8 +134,19 @@ public: static bool ItemColor(const std::string &Color, tColor &Result); static std::string ImagePath(const std::string &Filename); static cxType GetToken(const txToken &Token); + + // provide scrollbar in every menu + struct tMenuScrollbar + { + int current; + int total; + std::vector items; - // update infos + tMenuScrollbar(void) : current(0), total(0) {} + //bool available(void) { printf("%d / %d\n", total, GetMaxItems(); return total > GetMaxItems(); } + } mMenuScrollbar; + + // update infos (e.g. timerConflict) struct tUpdate { bool timerConflict; -- cgit v1.2.3 From 8d32cf88bbe5b69a2710029cdaa896470a0fe20c Mon Sep 17 00:00:00 2001 From: Andreas Brugger Date: Sat, 4 Feb 2006 18:25:22 +0100 Subject: 2006-02-04: Version 1.1-cvs_ext-0.8 (vdr-text2skin-1.1-cvs_ext-0.8.diff) - added a configuration option for showing the scrollbar in the menus and finished implementation --- render.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'render.h') diff --git a/render.h b/render.h index 4748a0d..cee31ab 100644 --- a/render.h +++ b/render.h @@ -7,6 +7,7 @@ #include "common.h" #include "scroller.h" +#include "setup.h" #include "xml/skin.h" #include "xml/type.h" #include @@ -47,6 +48,7 @@ private: std::string mBasePath; bool mDirty; + uint mMaxItems; cSkin *mFallback; // update thread @@ -115,6 +117,7 @@ protected: virtual bool HasTabText(int Index, int n) { return false; } virtual void SetEditableWidth(int Width) {} virtual void SetMaxItems(int MaxItems) {} + inline int GetmMaxItems(void) { return mMaxItems; } // functions for display renderer to control behaviour void Flush(bool Force = false); @@ -138,12 +141,18 @@ public: // provide scrollbar in every menu struct tMenuScrollbar { - int current; - int total; + uint current; // overall (0 ... toal-1) + uint currentOnScreen; // on the current screen (0 ... maxItems-1) + uint total; + uint maxItems; // viewable on current screen std::vector items; - tMenuScrollbar(void) : current(0), total(0) {} - //bool available(void) { printf("%d / %d\n", total, GetMaxItems(); return total > GetMaxItems(); } + tMenuScrollbar(void) : current(0), currentOnScreen(0), total(0), maxItems(0) {} + bool Available(void) { return Text2SkinSetup.MenuScrollbar ? total > maxItems : false; } + uint Top(void) { return current - currentOnScreen; } + uint Bottom(void) { return total - Top() - maxItems; } + bool CanScrollUp(void) { return Text2SkinSetup.MenuScrollbar ? Top() > 0 : false; } + bool CanScrollDown(void) { return Text2SkinSetup.MenuScrollbar ? Bottom() > 0 : false; } } mMenuScrollbar; // update infos (e.g. timerConflict) -- cgit v1.2.3