summaryrefslogtreecommitdiff
path: root/texteffects.c
diff options
context:
space:
mode:
authorAndreas Mair <amair.sob@googlemail.com>2008-03-09 09:39:06 +0100
committerAndreas Mair <amair.sob@googlemail.com>2008-03-09 09:39:06 +0100
commit7b34d920b0043281d7877d1e0ece8642d27f212d (patch)
treec3fb775627f5889beca307e407fcb95b4e6b7342 /texteffects.c
parent40650ddcf7b4142790b786e50f315dade90e8678 (diff)
downloadvdr-plugin-skinenigmang-7b34d920b0043281d7877d1e0ece8642d27f212d.tar.gz
vdr-plugin-skinenigmang-7b34d920b0043281d7877d1e0ece8642d27f212d.tar.bz2
2008-03-09: Version 0.0.6v0.0.6
- Added scrollbar in menu lists when compiled with VDR >= v1.5.15. - Fixed: VDR didn't responde anymore if the font used for lists was too small (<11px) and the marker in front of the active list item has been turned on. - Added workaround to fix chrashes (hopefully) for VDR 1.4.x and patched fonts. - Updated French translation (Submitted by Patrice Staudt). - Updated Dutch translation (Submitted by Johan Schuring). - Updated Spanish translation (Submitted by Bittor Corl). - Updated Finnish translation (Submitted by Rolf Ahrenberg). - Fixed crash in EPG details when using epgsearch if channel isn't found. - Updated Italian translation (Provided by Gringo). - Fix TrueTypeFonts support when compiled with VDR >= v1.5.4. - Use WeekDayNameFull() in VDR >= v1.5.5. - Use "Full Title Width" setting also for Tracks and Replay OSD. - Optionally scroll current event's title and subtitle in channel info. - New setup option "Show status symbols" (Suggested by chrisz @vdr-portal.de). - Moved to the new i18n system introduced in VDR 1.5.7; fully backwards compatible due to Udo Richter's po2i18n.pl. - Optionally show current WSS mode as symbol (if Avards is running). - Draw "Dolby Digital" and "MONO" indicator in language flags. - Hide inactive status symbols. - Removed date from OSDs: tracks, volume - Added status symbols in replay OSD. - Draw line right to logos in Tracks and Replay OSD as it's done in other OSDs too. - Added channel info OSD for "Info on channel switch = no" VDR option (Reported by Pat @vdr-portal.de). - Removed compile time dependencies to plugin services. - Renamed SKINENIGMA_HAVE_EPGSEARCH define to SKINENIGMA_USE_PLUGIN_EPGSEARCH. - Disable i18n support for VDR >= v1.5.7. - Added Turkish to translation array (for VDR >= v1.5.2). - Use group name for logos even if channel logos are searched for by channel id. - Fixed problems when compiling with VDR v1.5.7+ (Reported by Matthias Fechner). - Fixed problems with certain images (Submitted by pinky666 @vdr-portal.de). - Fixed crash if using display of repeatings in EPG details and reelchannelscan plugin is loaded. - New setup option for location of messages in menu OSD.
Diffstat (limited to 'texteffects.c')
-rw-r--r--texteffects.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/texteffects.c b/texteffects.c
index 6f9e320..e8981ff 100644
--- a/texteffects.c
+++ b/texteffects.c
@@ -138,13 +138,12 @@ void cEnigmaTextEffects::DoEffect(tEffect *e, uint64_t nNow)
void cEnigmaTextEffects::DoScroll(tEffect *e, uint64_t nNow, bool fDrawItem)
{
// debug("cEnigmaTextEffects::DoScroll()");
- const cFont *Font = EnigmaConfig.GetFont(e->FontId, e->Font);
- if (Font->Width(e->strText.c_str()) <= e->Width) {
+ if (e->Font->Width(e->strText.c_str()) <= e->Width) {
if (fDrawItem) {
if (e->Skin)
e->Skin->DrawTitle(e->strText.c_str());
else
- osd->DrawText(e->x, e->y, e->strText.c_str(), e->ColorFg, e->ColorBg, Font, e->Width, e->Height, e->Alignment);
+ osd->DrawText(e->x, e->y, e->strText.c_str(), e->ColorFg, e->ColorBg, e->Font, e->Width, e->Height, e->Alignment);
}
if (nNow)
@@ -157,7 +156,7 @@ void cEnigmaTextEffects::DoScroll(tEffect *e, uint64_t nNow, bool fDrawItem)
if (fDrawItem) {
switch (e->nDirection) {
case 0: // Scroll from left to right
- if (Font->Width(e->strText.c_str() + e->nOffset) <= e->Width) {
+ if (e->Font->Width(e->strText.c_str() + e->nOffset) <= e->Width) {
if (EnigmaConfig.scrollMode)
e->nDirection = 2;
else
@@ -187,27 +186,26 @@ void cEnigmaTextEffects::DoScroll(tEffect *e, uint64_t nNow, bool fDrawItem)
}
if (fDrawItem) {
-// printf("SCROLL: %d %d %d/%d (%s) %d %lu %lu\n", e->nOffset, e->nDirection, Font->Width(e->strText.c_str() + e->nOffset), e->Width, e->strText.c_str() + e->nOffset, e->strText.length(), nNow, e->nNextUpdate);
+// printf("SCROLL: %d %d %d/%d (%s) %d %lu %lu\n", e->nOffset, e->nDirection, e->Font->Width(e->strText.c_str() + e->nOffset), e->Width, e->strText.c_str() + e->nOffset, e->strText.length(), nNow, e->nNextUpdate);
if (e->Skin)
e->Skin->DrawTitle(e->strText.c_str() + e->nOffset);
else
- osd->DrawText(e->x, e->y, e->strText.c_str() + e->nOffset, e->ColorFg, e->ColorBg, Font, e->Width, e->Height);
+ osd->DrawText(e->x, e->y, e->strText.c_str() + e->nOffset, e->ColorFg, e->ColorBg, e->Font, e->Width, e->Height);
}
}
void cEnigmaTextEffects::DoBlink(tEffect *e, uint64_t nNow, bool fDrawItem)
{
// debug("cEnigmaTextEffects::DoBlink()");
- const cFont *Font = EnigmaConfig.GetFont(e->FontId, e->Font);
if (fDrawItem) {
if (nNow) {
e->nDirection = (e->nDirection == 0 ? 1 : 0);
e->nNextUpdate = nNow + EnigmaConfig.blinkPause;
}
if (e->nDirection == 1)
- osd->DrawText(e->x, e->y, e->strText.c_str() + e->nOffset, e->ColorFg, e->ColorBg, Font, e->Width, e->Height, e->Alignment);
+ osd->DrawText(e->x, e->y, e->strText.c_str() + e->nOffset, e->ColorFg, e->ColorBg, e->Font, e->Width, e->Height, e->Alignment);
else
- osd->DrawText(e->x, e->y, e->strText.c_str() + e->nOffset, e->ColorBg, e->ColorBg, Font, e->Width, e->Height, e->Alignment);
+ osd->DrawText(e->x, e->y, e->strText.c_str() + e->nOffset, e->ColorBg, e->ColorBg, e->Font, e->Width, e->Height, e->Alignment);
} else {
e->nNextUpdate = nNow + EnigmaConfig.blinkPause;
}
@@ -283,11 +281,10 @@ void cEnigmaTextEffects::ResetText(int i, tColor ColorFg, tColor ColorBg, bool f
tEffect *e = vecEffects[i];
if (e) {
if (fDraw && osd) {
- const cFont *Font = EnigmaConfig.GetFont(e->FontId, e->Font);
osd->DrawText(e->x, e->y, e->strText.c_str(),
ColorFg ? ColorFg : e->ColorFg,
ColorBg ? ColorBg : e->ColorBg,
- Font, e->Width, e->Height);
+ e->Font, e->Width, e->Height);
}
delete(e);
vecEffects[i] = NULL;
@@ -311,7 +308,7 @@ void cEnigmaTextEffects::UpdateTextWidth(int i, int Width)
}
}
-int cEnigmaTextEffects::DrawAnimatedTitle(int o_id, int action, const char *s, int Width, cSkinEnigmaOsd *skin)
+int cEnigmaTextEffects::DrawAnimatedTitle(int o_id, int action, const char *s, int Width, cSkinEnigmaThreadedOsd *skin)
{
//Must be TE_LOCKed by caller
@@ -349,7 +346,6 @@ int cEnigmaTextEffects::DrawAnimatedTitle(int o_id, int action, const char *s, i
effect->nAction = action;
effect->strText = std::string(s ? s : "");
effect->Width = Width;
- effect->FontId = FONT_OSDTITLE;;
effect->Font = Font;
effect->Skin = skin;
vecEffects.push_back(effect);
@@ -360,7 +356,7 @@ int cEnigmaTextEffects::DrawAnimatedTitle(int o_id, int action, const char *s, i
}
}
-int cEnigmaTextEffects::DrawAnimatedText(int o_id, int action, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, int FontId, int Width, int Height, int Alignment)
+int cEnigmaTextEffects::DrawAnimatedText(int o_id, int action, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, const cFont *Font, int Width, int Height, int Alignment)
{
//Must be TE_LOCKed by caller
@@ -386,7 +382,6 @@ int cEnigmaTextEffects::DrawAnimatedText(int o_id, int action, int x, int y, con
return -1;
}
} else {
- const cFont *Font = EnigmaConfig.GetFont(FontId);
if (Height == 0)
Height = Font->Height(s);
osd->DrawText(x, y, s ? s : "", ColorFg, ColorBg, Font, Width, Height, Alignment);
@@ -404,7 +399,6 @@ int cEnigmaTextEffects::DrawAnimatedText(int o_id, int action, int x, int y, con
effect->Height = Height;
effect->ColorFg = ColorFg;
effect->ColorBg = ColorBg;
- effect->FontId = FontId;
effect->Font = Font;
effect->Alignment = Alignment;
vecEffects.push_back(effect);