summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlordjaxom <lordjaxom>2005-01-21 18:28:04 +0000
committerlordjaxom <lordjaxom>2005-01-21 18:28:04 +0000
commit1078f462cc2b71640b6b2f32d7b3a44968034ae3 (patch)
tree4179e6f2210710082d3a041791f835d048e7c681
parente1d19862f678a5db58ccb8fd4cf072634c63cbe4 (diff)
downloadvdr-plugin-text2skin-1078f462cc2b71640b6b2f32d7b3a44968034ae3.tar.gz
vdr-plugin-text2skin-1078f462cc2b71640b6b2f32d7b3a44968034ae3.tar.bz2
- fixed detection of progress bar tabs
-rw-r--r--render.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/render.c b/render.c
index 456fa7a..fc0e48f 100644
--- a/render.c
+++ b/render.c
@@ -1,5 +1,5 @@
/*
- * $Id: render.c,v 1.25 2005/01/20 20:59:13 lordjaxom Exp $
+ * $Id: render.c,v 1.26 2005/01/21 18:28:04 lordjaxom Exp $
*/
#include "render.h"
@@ -267,8 +267,20 @@ void cText2SkinRender::DrawObject(const cxObject *Object)
obj.mPos2.y += Object->mPos1.y + yoffset;
std::string text = obj.Text();
+ bool isprogress = false;
if (text.length() > 5
&& text[0] == '[' && text[text.length() - 1] == ']') {
+ const char *p = text.c_str() + 1;
+ isprogress = true;
+ for (; *p != ']'; ++p) {
+ if (*p != ' ' && *p != '|') {
+ isprogress = false;
+ break;
+ }
+ }
+ }
+
+ if (isprogress) {
Dprintf("detected progress bar tab\n");
if (obj.Condition() == NULL || obj.Condition()->Evaluate()) {
int total = text.length() - 2;