diff --git a/examples/frame-callback/frame-callback.cpp b/examples/frame-callback/frame-callback.cpp index 27c4466..fcab8fc 100644 --- a/examples/frame-callback/frame-callback.cpp +++ b/examples/frame-callback/frame-callback.cpp @@ -18,8 +18,6 @@ // CLASS HEADER #include "frame-callback.h" -#include - using namespace Dali; FrameCallback::FrameCallback() @@ -33,7 +31,7 @@ void FrameCallback::SetStageWidth( float stageWidth ) stageHalfWidth = stageWidth * 0.5f; } -void FrameCallback::AddId( unsigned int id ) +void FrameCallback::AddId( uint32_t id ) { mActorIdContainer.PushBack( id ); } @@ -45,23 +43,27 @@ void FrameCallback::Update( Dali::UpdateProxy& updateProxy, float /* elapsedSeco { Vector3 position; Vector3 size; - updateProxy.GetPositionAndSize( i, position, size ); // Retrieve the position and size using the Actor ID. - - float halfWidthPoint = stageHalfWidth - size.width * 0.5f; - float xTranslation = std::abs( position.x ); - if( xTranslation > halfWidthPoint ) + if( updateProxy.GetPositionAndSize( i, position, size ) ) // Retrieve the position and size using the Actor ID. { - // Actor has hit the edge, adjust the size accordingly. - float adjustment = xTranslation - halfWidthPoint; - size.width += adjustment * SIZE_MULTIPLIER; - size.height += adjustment * SIZE_MULTIPLIER; + float halfWidthPoint = stageHalfWidth - size.width * 0.5f; + float xTranslation = std::abs( position.x ); + if( xTranslation > halfWidthPoint ) + { + // Actor has hit the edge, adjust the size accordingly. + float adjustment = xTranslation - halfWidthPoint; + size.width += adjustment * SIZE_MULTIPLIER; + size.height += adjustment * SIZE_MULTIPLIER; - updateProxy.SetSize( i, size ); // Set the size using the UpdateProxy. - } + updateProxy.SetSize( i, size ); // Set the size using the UpdateProxy. + } - // Retrieve the actor's position and set make it more transparent the closer it is to the middle. - Vector4 color = updateProxy.GetWorldColor( i ); - color.a = xTranslation / halfWidthPoint; - updateProxy.SetWorldColor( i, color ); + // Retrieve the actor's position and set make it more transparent the closer it is to the middle. + Vector4 color; + if( updateProxy.GetColor( i, color ) ) + { + color.a = xTranslation / halfWidthPoint; + updateProxy.SetColor( i, color ); + } + } } } diff --git a/examples/frame-callback/frame-callback.h b/examples/frame-callback/frame-callback.h index c46a517..3302c0f 100644 --- a/examples/frame-callback/frame-callback.h +++ b/examples/frame-callback/frame-callback.h @@ -48,7 +48,7 @@ public: * @brief The actor with the specified ID will be changed when Update() is called. * @param[in] id Actor ID of actor which should be changed by the FrameCallback. */ - void AddId( unsigned int id ); + void AddId( uint32_t id ); private: @@ -61,7 +61,7 @@ private: private: - Dali::Vector< unsigned int > mActorIdContainer; ///< Container of Actor IDs. + Dali::Vector< uint32_t > mActorIdContainer; ///< Container of Actor IDs. float stageHalfWidth; ///< Half the width of the stage. Center is 0,0 in the world matrix. constexpr static float SIZE_MULTIPLIER = 2.0f; ///< Multiplier for the size to set as the actors hit the edge. diff --git a/packaging/com.samsung.dali-demo.spec b/packaging/com.samsung.dali-demo.spec index 7fc7a90..61f5fdf 100755 --- a/packaging/com.samsung.dali-demo.spec +++ b/packaging/com.samsung.dali-demo.spec @@ -2,7 +2,7 @@ Name: com.samsung.dali-demo Summary: The OpenGLES Canvas Core Demo -Version: 1.3.45 +Version: 1.3.46 Release: 1 Group: System/Libraries License: Apache-2.0