X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=examples%2Frendering-basic-light%2Frendering-basic-light-example.cpp;h=24417435d048ef4eb1c7af932e43a0ceb9a7a140;hb=2e182925204bf3ef9f2a36cbfbf998e79fbafaf5;hp=aafa99184a2218a29588d2d94a727842d354298b;hpb=35fdc8178d134261b84f267e3e3fc397763f1c13;p=platform%2Fcore%2Fuifw%2Fdali-demo.git diff --git a/examples/rendering-basic-light/rendering-basic-light-example.cpp b/examples/rendering-basic-light/rendering-basic-light-example.cpp index aafa991..2441743 100644 --- a/examples/rendering-basic-light/rendering-basic-light-example.cpp +++ b/examples/rendering-basic-light/rendering-basic-light-example.cpp @@ -161,21 +161,21 @@ public: Stage stage = Stage::GetCurrent(); stage.SetBackgroundColor( Color::BLACK ); mLabel = TextLabel::New( material[MaterialID].name ); - mLabel.SetAnchorPoint( AnchorPoint::TOP_CENTER ); - mLabel.SetParentOrigin( Vector3( 0.5f, 0.0f, 0.5f ) ); - mLabel.SetSize( stage.GetSize().x * 0.5f, stage.GetSize().y * 0.083f ); + mLabel.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); + mLabel.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5f, 0.0f, 0.5f ) ); + mLabel.SetProperty( Actor::Property::SIZE, Vector2( stage.GetSize().x * 0.5f, stage.GetSize().y * 0.083f ) ); mLabel.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); mLabel.SetProperty( TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); mLabel.SetProperty( TextLabel::Property::TEXT_COLOR, Vector4( 1.0f, 1.0f, 1.0f, 1.0f )); stage.Add( mLabel ); mButton = PushButton::New(); mButton.SetProperty( Button::Property::LABEL, "Exit" ); - mButton.SetParentOrigin( ParentOrigin::CENTER ); - mButton.SetAnchorPoint( AnchorPoint::CENTER ); + mButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + mButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); mButton.ClickedSignal().Connect( this, &BasicLightController::OnExit ); - mButton.SetParentOrigin( Vector3( 0.5f, 0.1f, 0.5f ) ); + mButton.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5f, 0.1f, 0.5f ) ); mButton.SetStyleName(CUSTOM_BASIC_LIGHT_THEME); - mButton.SetColor( Vector4( material[MaterialID].diffuse) + Vector4( 0.0f, 0.0f, 0.0f, 1.0f ) ); + mButton.SetProperty( Actor::Property::COLOR, Vector4( material[MaterialID].diffuse) + Vector4( 0.0f, 0.0f, 0.0f, 1.0f ) ); stage.Add(mButton); // Step 1. Create shader @@ -215,7 +215,7 @@ public: mShader.SetProperty( mShader.GetPropertyIndex( "material.specular" ), material[MaterialID].specular ); mShader.SetProperty( mShader.GetPropertyIndex( "material.shininess" ), material[MaterialID].shininess * 128.0f ); mLabel.SetProperty( TextLabel::Property::TEXT, material[MaterialID].name ); - mButton.SetColor( Vector4(material[MaterialID].diffuse) + Vector4(0.0f, 0.0f, 0.0f, 1.0f) ); + mButton.SetProperty( Actor::Property::COLOR, Vector4(material[MaterialID].diffuse) + Vector4(0.0f, 0.0f, 0.0f, 1.0f) ); } return true; } @@ -377,10 +377,10 @@ public: float quarterStageWidth = stage.GetSize().x * 0.25f; mActor = Actor::New(); - mActor.SetColor( Vector4( 1.0f, 1.0f, 0.6f, 1.0f ) ); - mActor.SetAnchorPoint( AnchorPoint::CENTER ); - mActor.SetParentOrigin( ParentOrigin::CENTER ); - mActor.SetSize( Vector3( quarterStageWidth, quarterStageWidth, quarterStageWidth ) ); + mActor.SetProperty( Actor::Property::COLOR, Vector4( 1.0f, 1.0f, 0.6f, 1.0f ) ); + mActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + mActor.SetProperty( Actor::Property::SIZE, Vector3( quarterStageWidth, quarterStageWidth, quarterStageWidth ) ); mActor.AddRenderer( mRenderer ); stage.Add( mActor ); } @@ -409,20 +409,10 @@ private: Animation mAnimation; }; -void RunTest( Application& application ) -{ - BasicLightController test( application ); - - application.MainLoop(); -} - -// Entry point for Linux & Tizen applications -// int DALI_EXPORT_API main( int argc, char **argv ) { Application application = Application::New( &argc, &argv, BASIC_LIGHT_THEME); - - RunTest( application ); - + BasicLightController test( application ); + application.MainLoop(); return 0; }