summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2015-02-06 19:36:24 +0100
committerMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2015-02-06 19:36:24 +0100
commitce51da5033e8bda4e19654483d5878b01b4381ef (patch)
tree6924b1e8b6c090f830d27f27a9e1407c2c5dccc8
parentd8a22aa6eecf4bb1c55f2804972d519153986cd9 (diff)
downloadskin-flatplus-ce51da5033e8bda4e19654483d5878b01b4381ef.tar.gz
skin-flatplus-ce51da5033e8bda4e19654483d5878b01b4381ef.tar.bz2
[add] support for message text with parse tilde and extra text color
-rw-r--r--HISTORY1
-rw-r--r--baserender.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/HISTORY b/HISTORY
index 2414b5f7..7101962a 100644
--- a/HISTORY
+++ b/HISTORY
@@ -15,6 +15,7 @@ VDR Plugin 'skinflatplus' Revision History
- [update] disk usage icons with 16 sections instead of 8
- [update] widgets: system_information.g2v, temperatures.g2v, temperatures.default
- [update] widgets: weather text size of temperature in long view
+- [add] support for message text with parse tilde and extra text color
2014-12-04: Version 0.5.0
- [fix] femon receiver - do not get data from previous channel
diff --git a/baserender.c b/baserender.c
index c7c027c5..a60bcbc7 100644
--- a/baserender.c
+++ b/baserender.c
@@ -613,7 +613,9 @@ void cFlatBaseRender::MessageSet(eMessageType Type, const char *Text) {
int textWidth = font->Width(Text);
int maxWidth = osdWidth - Config.decorBorderMessageSize*2 - fontHeight - marginItem*3 - 10;
- if( Config.MenuItemParseTilde ) {
+ if( (textWidth > maxWidth) && Config.ScrollerEnable ) {
+ messageScroller.AddScroller(Text, cRect(Config.decorBorderMessageSize + fontHeight + marginItem*3 + 10, osdHeight - Config.MessageOffset - messageHeight - Config.decorBorderMessageSize, maxWidth, fontHeight), Theme.Color(clrMessageFont), clrTransparent, font, Theme.Color(clrMenuItemExtraTextFont));
+ } else if( Config.MenuItemParseTilde ) {
std::string tilde = Text;
size_t found = tilde.find(" ~ ");
size_t found2 = tilde.find("~");