diff options
author | Thomas Günther <tom@toms-cafe.de> | 2009-07-24 23:28:27 +0200 |
---|---|---|
committer | Thomas Günther <tom@toms-cafe.de> | 2009-07-24 23:28:27 +0200 |
commit | 1a2670629526a93b9862fc210ffaa13f184d2a16 (patch) | |
tree | b31f206851ed77cc7055228eba17cafe961c482d /render.c | |
parent | 53c06587dee00deeabdf75b0f124816ce793fc7d (diff) | |
download | vdr-plugin-text2skin-1a2670629526a93b9862fc210ffaa13f184d2a16.tar.gz vdr-plugin-text2skin-1a2670629526a93b9862fc210ffaa13f184d2a16.tar.bz2 |
Fixed: Text scroller is not UTF-8 aware (closes #146)
Diffstat (limited to 'render.c')
-rw-r--r-- | render.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -505,7 +505,7 @@ void cText2SkinRender::DrawMarquee(const txPoint &Pos, const txSize &Size, const else if (mNow >= state.nexttime) { uint nextin = Delay; if (state.direction > 0) { - if (Font->Width(Text.c_str() + state.offset) <= Size.w) { + if (Font->Width(Text.c_str() + Utf8SymChars(Text.c_str(), state.offset)) <= Size.w) { --state.direction; nextin = 1500; } else @@ -532,7 +532,7 @@ void cText2SkinRender::DrawMarquee(const txPoint &Pos, const txSize &Size, const if (Bg) mScreen->DrawRectangle(Pos.x, Pos.y, Pos.x + Size.w - 1, Pos.y + Size.h - 1, *Bg); - mScreen->DrawText(Pos.x, Pos.y, Text.c_str() + state.offset, Fg ? *Fg : 0, clrTransparent, Font, + mScreen->DrawText(Pos.x, Pos.y, Text.c_str() + Utf8SymChars(Text.c_str(), state.offset), Fg ? *Fg : 0, clrTransparent, Font, Size.w, Size.h, Align); } |