/*
- * Copyright (c) 2019 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.
*/
void Create( Application& application )
{
- Stage stage = Stage::GetCurrent();
+ Window window = application.GetWindow();
- stage.KeyEventSignal().Connect(this, &TextVisualExample::OnKeyEvent);
- stage.SetBackgroundColor( Color::WHITE );
+ window.KeyEventSignal().Connect(this, &TextVisualExample::OnKeyEvent);
+ window.SetBackgroundColor( Color::WHITE );
Dali::Toolkit::Control control = Dali::Toolkit::ImageView::New();
control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
control.SetProperty( Dali::Toolkit::Control::Property::BACKGROUND, map );
- stage.Add( control );
+ window.Add( control );
}
/**
*/
void OnKeyEvent(const KeyEvent& event)
{
- if(event.state == KeyEvent::Down)
+ if(event.GetState() == KeyEvent::Down)
{
if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) )
{