diff options
author | louis <louis.braun@gmx.de> | 2015-04-12 17:10:06 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2015-04-12 17:10:06 +0200 |
commit | e8291960bd4b221ff7e55aa55fd45aaeb3c8d37a (patch) | |
tree | 035edf9bbba62e22dd3dcf70ebde1d0effece1bd /libtemplate/templatefunction.c | |
parent | 22da0fccd432610f6a2ca9ea1a1c5557fb12edec (diff) | |
download | vdr-plugin-skindesigner-e8291960bd4b221ff7e55aa55fd45aaeb3c8d37a.tar.gz vdr-plugin-skindesigner-e8291960bd4b221ff7e55aa55fd45aaeb3c8d37a.tar.bz2 |
added possibility for blinking images, texts, rectangles, ellipses and slopes
Diffstat (limited to 'libtemplate/templatefunction.c')
-rw-r--r-- | libtemplate/templatefunction.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/libtemplate/templatefunction.c b/libtemplate/templatefunction.c index 7b76539..c99fa37 100644 --- a/libtemplate/templatefunction.c +++ b/libtemplate/templatefunction.c @@ -143,6 +143,10 @@ void cTemplateFunction::SetParameters(vector<pair<string, string> > params) { p.first = ptDeterminateFont;
} else if (!name.compare("direction")) {
p.first = ptDirection;
+ } else if (!name.compare("animtype")) {
+ p.first = ptAnimType;
+ } else if (!name.compare("animfreq")) {
+ p.first = ptAnimFreq;
} else {
p.first = ptNone;
}
@@ -242,6 +246,7 @@ bool cTemplateFunction::CalculateParameters(void) { case ptScaleTvY:
case ptScaleTvWidth:
case ptScaleTvHeight:
+ case ptAnimFreq:
SetNumericParameter(type, value);
break;
case ptAlign:
@@ -287,6 +292,9 @@ bool cTemplateFunction::CalculateParameters(void) { case ptDirection:
paramValid = SetDirection(value);
break;
+ case ptAnimType:
+ paramValid = SetAnimType(value);
+ break;
default:
paramValid = true;
break;
@@ -736,6 +744,16 @@ bool cTemplateFunction::DoExecute(void) { return condParam->IsTrue();
}
+bool cTemplateFunction::IsAnimated(void) {
+ map< eParamType, int >::iterator hit = numericParameters.find(ptAnimType);
+ if (hit == numericParameters.end())
+ return false;
+ eAnimType type = (eAnimType)hit->second;
+ if (type > atNone)
+ return true;
+ return false;
+}
+
/*******************************************************************
* Private Functions
*******************************************************************/
@@ -1125,6 +1143,16 @@ bool cTemplateFunction::SetDirection(string value) { return true;
}
+bool cTemplateFunction::SetAnimType(string value) {
+ int animType = atNone;
+ if (!value.compare("blink"))
+ animType = atBlink;
+ else if (!value.compare("animated"))
+ animType = atAnimated;
+ numericParameters.insert(pair<eParamType, int>(ptAnimType, animType));
+ return true;
+}
+
void cTemplateFunction::SetDebugGrid(string value) {
int numGridsX = 0;
int numGridsY = 0;
@@ -1653,6 +1681,12 @@ string cTemplateFunction::GetParamName(eParamType pt) { case ptDirection:
name = "Text Direction";
break;
+ case ptAnimType:
+ name = "Animation Type";
+ break;
+ case ptAnimFreq:
+ name = "Animation Frequency";
+ break;
default:
name = "Unknown";
break;
|