}
}
-Animation Builder::CreateAnimation( const std::string& animationName, const Replacement& replacement, Dali::Actor searchRoot )
+Animation Builder::CreateAnimation( const std::string& animationName, const Replacement& replacement, Dali::Actor sourceActor )
{
Animation anim;
{
if( OptionalChild animation = IsChild(*animations, animationName) )
{
- anim = Dali::Toolkit::Internal::CreateAnimation( *animation, replacement, Stage::GetCurrent().GetRootLayer() );
+ anim = Dali::Toolkit::Internal::CreateAnimation( *animation, replacement, sourceActor );
}
else
{
return anim;
}
-Animation Builder::CreateAnimation( const std::string& animationName, const PropertyValueMap& map, Dali::Actor searchRoot )
+Animation Builder::CreateAnimation( const std::string& animationName, const PropertyValueMap& map, Dali::Actor sourceActor )
{
Replacement replacement(map, mReplacementMap);
- return CreateAnimation( animationName, replacement, searchRoot);
+ return CreateAnimation( animationName, replacement, sourceActor);
}
Animation Builder::CreateAnimation( const std::string& animationName, const PropertyValueMap& map )
return CreateAnimation( animationName, replacement, Stage::GetCurrent().GetRootLayer() );
}
-Animation Builder::CreateAnimation( const std::string& animationName, Dali::Actor searchRoot )
+Animation Builder::CreateAnimation( const std::string& animationName, Dali::Actor sourceActor )
{
Replacement replacement( mReplacementMap );
- return CreateAnimation( animationName, replacement, searchRoot );
+ return CreateAnimation( animationName, replacement, sourceActor );
}
Animation Builder::CreateAnimation( const std::string& animationName )
{
Replacement replacement( mReplacementMap );
+
return CreateAnimation( animationName, replacement, Dali::Stage::GetCurrent().GetRootLayer() );
}
}
}
+void Builder::AddConstant( const std::string& key, const Property::Value& value )
+{
+ mReplacementMap[key] = value;
+}
+
+const PropertyValueMap& Builder::GetConstants() const
+{
+ return mReplacementMap;
+}
+
+const Property::Value& Builder::GetConstant( const std::string& key ) const
+{
+ PropertyValueMap::const_iterator iter = mReplacementMap.find( key );
+ if( iter != mReplacementMap.end() )
+ {
+ return (*iter).second;
+ }
+ else
+ {
+ static Property::Value invalid;
+ return invalid;
+ }
+}
+
void Builder::LoadConstants()
{
Replacement replacer(mReplacementMap);