summaryrefslogtreecommitdiff
path: root/skinsttng.c
diff options
context:
space:
mode:
Diffstat (limited to 'skinsttng.c')
-rw-r--r--skinsttng.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/skinsttng.c b/skinsttng.c
index 1e2d8cd..97e8fc8 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.16 2006/01/01 14:38:14 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)
@@ -721,7 +733,7 @@ void cSkinSTTNGDisplayReplay::SetTitle(const char *Title)
osd->DrawText(x3 + 5, y0, Title, Theme.Color(clrReplayTitle), frameColor, cFont::GetFont(fontSml), x4 - x3 - 5);
}
-static char **ReplaySymbols[2][2][5] = {
+static const char *const *ReplaySymbols[2][2][5] = {
{ { pause_xpm, srew_xpm, srew1_xpm, srew2_xpm, srew3_xpm },
{ pause_xpm, sfwd_xpm, sfwd1_xpm, sfwd2_xpm, sfwd3_xpm }, },
{ { play_xpm, frew_xpm, frew1_xpm, frew2_xpm, frew3_xpm },