Use Property:LABEL instead of SetLabelText for buttons
[platform/core/uifw/dali-demo.git] / examples / model3d-view / model3d-view-example.cpp
index 40cf6eb..08cb8fa 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
@@ -57,7 +57,16 @@ class Model3dViewController : public ConnectionTracker
 public:
 
   Model3dViewController( Application& application )
-  : mApplication( application )
+  : mApplication( application ),
+    mModelCounter( 0 ),
+    mModel3dView(),
+    mButtonLayer(),
+    mTapDetector(),
+    mIlluminationShader( Model3dView::DIFFUSE ),
+    mRotationAnimation(),
+    mLightAnimation(),
+    mPlaying( false ),
+    mScaled( false )
   {
     // Connect to the Application's Init signal
     mApplication.InitSignal().Connect( this, &Model3dViewController::Create );
@@ -108,7 +117,7 @@ public:
     editButton.ClickedSignal().Connect( this, &Model3dViewController::OnChangeModelClicked);
     editButton.SetParentOrigin( ParentOrigin::TOP_LEFT );
     editButton.SetAnchorPoint( AnchorPoint::TOP_LEFT );
-    editButton.SetLabelText( "Change Model" );
+    editButton.SetProperty( Toolkit::Button::Property::LABEL, "Change Model" );
     mButtonLayer.Add( editButton  );
 
     // Create button for shader changing
@@ -117,7 +126,7 @@ public:
     editButton.ClickedSignal().Connect( this, &Model3dViewController::OnChangeLightingClicked);
     editButton.SetParentOrigin( ParentOrigin::TOP_RIGHT );
     editButton.SetAnchorPoint( AnchorPoint::TOP_RIGHT );
-    editButton.SetLabelText( "Change Shader" );
+    editButton.SetProperty( Toolkit::Button::Property::LABEL, "Change Shader" );
     mButtonLayer.Add( editButton  );
 
     // Create button for pause/resume animation
@@ -126,7 +135,7 @@ public:
     editButton.ClickedSignal().Connect( this, &Model3dViewController::OnPauseAnimationsClicked);
     editButton.SetParentOrigin( ParentOrigin::BOTTOM_CENTER );
     editButton.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER );
-    editButton.SetLabelText( "Pause Animations" );
+    editButton.SetProperty( Toolkit::Button::Property::LABEL, "Pause Animations" );
     mButtonLayer.Add( editButton  );
 
     //Create animations