/*
- * 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.
*/
// EXTERNAL INCLUDES
+#include <dali/devel-api/actors/actor-devel.h>
#include <dali-toolkit/dali-toolkit.h>
// INTERNAL INCLUDES
*/
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 );
mMeshActor = Actor::New();
mMeshActor.AddRenderer( mRenderer );
- mMeshActor.SetSize(400, 400);
+ 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 );
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));
}
/**
private:
Application& mApplication; ///< Application instance
- Vector3 mStageSize; ///< The size of the stage
+ Vector3 mWindowSize; ///< The size of the window
Shader mShader;
Geometry mGeometry;