diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2006-02-05 15:09:51 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2006-02-05 15:09:51 +0100 |
commit | c5a5f098453635e142f936de0b2d3378517d3fc2 (patch) | |
tree | bd9cc5df1e73d6efb6da82887d60884fa2378982 /skinsttng.c | |
parent | 36b720b1cfc3e21acafc543bed68bb67197b9b33 (diff) | |
download | vdr-1d6d1864c30b7581325f8c83bcb6501227728954.tar.gz vdr-1d6d1864c30b7581325f8c83bcb6501227728954.tar.bz2 |
Added cSkin::GetTextAreaWidth() and cSkin::GetTextAreaFont()1.3.42
Diffstat (limited to 'skinsttng.c')
-rw-r--r-- | skinsttng.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/skinsttng.c b/skinsttng.c index dccfb584..97e8fc8b 100644 --- a/skinsttng.c +++ b/skinsttng.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: skinsttng.c 1.17 2006/02/05 13:46:37 kls Exp $ + * $Id: skinsttng.c 1.18 2006/02/05 14:51:39 kls Exp $ */ // Star Trek: The Next Generation® is a registered trademark of Paramount Pictures @@ -347,6 +347,8 @@ public: virtual void SetEvent(const cEvent *Event); virtual void SetRecording(const cRecording *Recording); virtual void SetText(const char *Text, bool FixedFont); + virtual int GetTextAreaWidth(void) const; + virtual const cFont *GetTextAreaFont(bool FixedFont) const; virtual void Flush(void); }; @@ -618,10 +620,20 @@ void cSkinSTTNGDisplayMenu::SetRecording(const cRecording *Recording) void cSkinSTTNGDisplayMenu::SetText(const char *Text, bool FixedFont) { + textScroller.Set(osd, x3, y3, GetTextAreaWidth(), y4 - y3, Text, GetTextAreaFont(FixedFont), Theme.Color(clrMenuText), Theme.Color(clrBackground)); + SetScrollbar(); +} + +int cSkinSTTNGDisplayMenu::GetTextAreaWidth(void) const +{ + return x4 - x3; +} + +const cFont *cSkinSTTNGDisplayMenu::GetTextAreaFont(bool FixedFont) const +{ const cFont *font = cFont::GetFont(FixedFont ? fontFix : fontOsd); font = cFont::GetFont(fontSml);//XXX -> make a way to let the text define which font to use - textScroller.Set(osd, x3, y3, x4 - x3, y4 - y3, Text, font, Theme.Color(clrMenuText), Theme.Color(clrBackground)); - SetScrollbar(); + return font; } void cSkinSTTNGDisplayMenu::Flush(void) |