/*
- * 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, &SimpleTextLabelExample::OnKeyEvent);
+ window.KeyEventSignal().Connect(this, &SimpleTextLabelExample::OnKeyEvent);
mLabel = TextLabel::New( "A Quick Brown Fox Jumps Over The Lazy Dog" );
mLabel.SetProperty( Dali::Actor::Property::NAME, "SimpleTextLabel" );
mLabel.SetProperty( TextLabel::Property::TEXT_COLOR, Color::BLACK );
mLabel.SetBackgroundColor( Color::WHITE );
- stage.Add( mLabel );
+ window.Add( mLabel );
}
/**
*/
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 ) )
{