X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=examples%2Fmesh-morph%2Fmesh-morph-example.cpp;h=af8662c3612d3ac2cde49ecdcee3fc7ac251d644;hb=708a5e016f973900a20a885914d3b70741fa80d9;hp=e2d0773426ebbb64b011ab550955841fd84c8678;hpb=2e182925204bf3ef9f2a36cbfbf998e79fbafaf5;p=platform%2Fcore%2Fuifw%2Fdali-demo.git diff --git a/examples/mesh-morph/mesh-morph-example.cpp b/examples/mesh-morph/mesh-morph-example.cpp index e2d0773..af8662c 100644 --- a/examples/mesh-morph/mesh-morph-example.cpp +++ b/examples/mesh-morph/mesh-morph-example.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,6 +16,7 @@ */ // EXTERNAL INCLUDES +#include #include // INTERNAL INCLUDES @@ -280,16 +281,13 @@ public: */ void Create( Application& application ) { - Stage stage = Stage::GetCurrent(); - stage.KeyEventSignal().Connect(this, &ExampleController::OnKeyEvent); + Window window = application.GetWindow(); + window.KeyEventSignal().Connect(this, &ExampleController::OnKeyEvent); - mStageSize = stage.GetSize(); + mWindowSize = window.GetSize(); // The Init signal is received once (only) during the Application lifetime - // Hide the indicator bar - application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE ); - mShader = Shader::New( VERTEX_SHADER, FRAGMENT_SHADER ); mGeometry = CreateGeometry(); mRenderer = Renderer::New( mGeometry, mShader ); @@ -297,6 +295,7 @@ public: mMeshActor = Actor::New(); mMeshActor.AddRenderer( mRenderer ); mMeshActor.SetProperty( Actor::Property::SIZE, Vector2(400, 400) ); + mMeshActor.SetProperty( DevelActor::Property::UPDATE_SIZE_HINT, Vector2(480, 700) ); Property::Index morphDeltaIndex = mMeshActor.RegisterProperty( "uDelta", 0.f ); @@ -304,14 +303,14 @@ public: mMeshActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mMeshActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - stage.Add( mMeshActor ); + window.Add( mMeshActor ); Animation animation = Animation::New(10); animation.AnimateTo( Property( mMeshActor, morphDeltaIndex ), 1.f, StationarySin ); animation.SetLooping( true ); animation.Play(); - stage.SetBackgroundColor(Vector4(0.0f, 0.2f, 0.2f, 1.0f)); + window.SetBackgroundColor(Vector4(0.0f, 0.2f, 0.2f, 1.0f)); } /** @@ -339,7 +338,7 @@ public: private: Application& mApplication; ///< Application instance - Vector3 mStageSize; ///< The size of the stage + Vector3 mWindowSize; ///< The size of the window Shader mShader; Geometry mGeometry;