Removing unused variables
[platform/core/uifw/dali-demo.git] / examples / simple-text-visual / simple-text-visual-example.cpp
index 24a6c68..89ba3e2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -50,10 +50,10 @@ public:
    */
   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 );
@@ -72,7 +72,7 @@ public:
 
     control.SetProperty( Dali::Toolkit::Control::Property::BACKGROUND, map );
 
-    stage.Add( control );
+    window.Add( control );
   }
 
   /**
@@ -80,7 +80,7 @@ public:
    */
   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 ) )
       {