/*
- * 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>
+#include <dali-toolkit/devel-api/controls/table-view/table-view.h>
// INTERNAL INCLUDES
#include "shared/view.h"
*/
ExampleController( Application& application )
: mApplication( application ),
- mStageSize(),
+ mWindowSize(),
mShader(),
mGeometry(),
mRenderer(),
*/
void Create( Application& application )
{
- Stage stage = Stage::GetCurrent();
+ Window window = application.GetWindow();
// initial settings
mPrimitiveType = Geometry::LINES;
CreateRadioButtons();
- stage.KeyEventSignal().Connect(this, &ExampleController::OnKeyEvent);
+ window.KeyEventSignal().Connect(this, &ExampleController::OnKeyEvent);
- mStageSize = stage.GetSize();
+ mWindowSize = window.GetSize();
Initialise();
- // Hide the indicator bar
- application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE );
-
- stage.SetBackgroundColor(Vector4(0.0f, 0.2f, 0.2f, 1.0f));
+ window.SetBackgroundColor(Vector4(0.0f, 0.2f, 0.2f, 1.0f));
}
/**
*/
void Initialise()
{
- Stage stage = Stage::GetCurrent();
+ Window window = mApplication.GetWindow();
// destroy mesh actor and its resources if already exists
if( mMeshActor )
{
- stage.Remove( mMeshActor );
+ window.Remove( mMeshActor );
mMeshActor.Reset();
}
mMeshActor = Actor::New();
mMeshActor.AddRenderer( mRenderer );
mMeshActor.SetProperty( Actor::Property::SIZE, Vector2(200, 200) );
+ mMeshActor.SetProperty( DevelActor::Property::UPDATE_SIZE_HINT, Vector2(400, 400) );
Property::Index morphAmountIndex = mMeshActor.RegisterProperty( "uMorphAmount", 0.0f );
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(5);
KeyFrames keyFrames = KeyFrames::New();
*/
void CreateRadioButtons()
{
- Stage stage = Stage::GetCurrent();
+ Window window = mApplication.GetWindow();
Toolkit::TableView modeSelectTableView = Toolkit::TableView::New( 4, 1 );
modeSelectTableView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
elementCountTableView.AddChild( mIndicesCountLabel, Toolkit::TableView::CellPosition( 0, 1 ) );
elementCountTableView.AddChild( mPlusButton, Toolkit::TableView::CellPosition( 0, 2 ) );
- stage.Add(modeSelectTableView);
- stage.Add(elementCountTableView);
+ window.Add(modeSelectTableView);
+ window.Add(elementCountTableView);
}
/**
private:
Application& mApplication; ///< Application instance
- Vector3 mStageSize; ///< The size of the stage
+ Vector3 mWindowSize; ///< The size of the window
Shader mShader;
Geometry mGeometry;