Added animation and constraint support for UNSIGNED_INTEGER property type
[platform/core/uifw/dali-core.git] / dali / internal / update / common / property-condition-variable-step-functions.cpp
index 1be75e8..3b259dc 100644 (file)
@@ -46,14 +46,19 @@ ConditionFunction VariableStep::GetFunction( Property::Type valueType )
 
   switch( valueType )
   {
-    case Property::FLOAT:
+    case Property::INTEGER:
     {
-      function = EvalFloat;
+      function = EvalInteger;
       break;
     }
-    case Property::INTEGER:
+    case Property::UNSIGNED_INTEGER:
     {
-      function = EvalInteger;
+      function = EvalUnsignedInteger;
+      break;
+    }
+    case Property::FLOAT:
+    {
+      function = EvalFloat;
       break;
     }
     case Property::VECTOR2:
@@ -148,15 +153,21 @@ bool VariableStep::Evaluate( const float propertyValue, PropertyNotification::Ra
   return false;
 }
 
-bool VariableStep::EvalFloat( const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg )
+bool VariableStep::EvalInteger( const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg )
 {
-  const float propertyValue = value.GetFloat();
+  const float propertyValue = static_cast<float>( value.GetInteger() );
   return Evaluate( propertyValue, arg );
 }
 
-bool VariableStep::EvalInteger( const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg )
+bool VariableStep::EvalUnsignedInteger( const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg )
 {
-  const float propertyValue = static_cast<float>( value.GetInteger() );
+  const float propertyValue = static_cast<float>( value.GetUnsignedInteger() );
+  return Evaluate( propertyValue, arg );
+}
+
+bool VariableStep::EvalFloat( const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg )
+{
+  const float propertyValue = value.GetFloat();
   return Evaluate( propertyValue, arg );
 }