/*
- * 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.
// The Init signal is received once (only) during the Application lifetime
void Create( Application& application )
{
- // Get a handle to the stage
- Stage stage = Stage::GetCurrent();
+ // Get a handle to the window
+ Window window = application.GetWindow();
- stage.GetRootLayer().TouchSignal().Connect( this, &RayMarchingExample::OnTouch );
+ window.GetRootLayer().TouchSignal().Connect( this, &RayMarchingExample::OnTouch );
- stage.KeyEventSignal().Connect(this, &RayMarchingExample::OnKeyEvent);
+ window.KeyEventSignal().Connect(this, &RayMarchingExample::OnKeyEvent);
- stage.SetBackgroundColor( Color::YELLOW );
-
- // Hide the indicator bar
- application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE );
+ window.SetBackgroundColor( Color::YELLOW );
// Creates a default view with a default tool bar.
- // The view is added to the stage.
+ // The view is added to the window.
mContentLayer = DemoHelper::CreateView( application,
mView,
mToolBar,
AddContentLayer();
}
- bool OnTouch( Actor actor, const TouchData& touch )
+ bool OnTouch( Actor actor, const TouchEvent& touch )
{
// quit the application
mApplication.Quit();
*/
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) )
{
Property::Map vertexFormat;
vertexFormat["aPosition"] = Property::VECTOR2;
- PropertyBuffer vertexBuffer = PropertyBuffer::New( vertexFormat );
+ VertexBuffer vertexBuffer = VertexBuffer::New( vertexFormat );
const float P( 0.5f );
const Vector2 vertices[] = {
void AddContentLayer()
{
- Stage stage = Stage::GetCurrent();
+ Window window = mApplication.GetWindow();
//Create all the renderers
Renderer renderer = CreateQuadRenderer();