/*
- * 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.
Property::Map polyhedraVertexFormat;
polyhedraVertexFormat["aPosition"] = Property::VECTOR2;
polyhedraVertexFormat["aHue"] = Property::FLOAT;
- PropertyBuffer polyhedraVertices = PropertyBuffer::New( polyhedraVertexFormat );
+ VertexBuffer polyhedraVertices = VertexBuffer::New( polyhedraVertexFormat );
polyhedraVertices.SetData( polyhedraVertexData, numSides );
// Create the geometry object
*/
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 );
-
Texture texture0 = DemoHelper::LoadTexture( MATERIAL_SAMPLE );
Texture texture1 = DemoHelper::LoadTexture( MATERIAL_SAMPLE2 );
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(15);
KeyFrames keyFrames = KeyFrames::New();
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));
}
/**
void OnKeyEvent(const KeyEvent& event)
{
- if(event.state == KeyEvent::Down)
+ if(event.GetState() == KeyEvent::Down)
{
if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) )
{
private:
Application& mApplication; ///< Application instance
- Vector3 mStageSize; ///< The size of the stage
+ Vector3 mWindowSize; ///< The size of the window
Renderer mRenderer;
Actor mMeshActor;