From: Agnelo Vaz Date: Thu, 8 Dec 2016 15:04:38 +0000 (+0000) Subject: Updating mesh example to work with button upgrade X-Git-Tag: dali_1.2.19~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F49%2F103549%2F2;p=platform%2Fcore%2Fuifw%2Fdali-demo.git Updating mesh example to work with button upgrade Change-Id: Iddf64b834aec8b5c75317c7dac78404f19346236 --- diff --git a/examples/line-mesh/line-mesh-example.cpp b/examples/line-mesh/line-mesh-example.cpp index c6740ad..5127284 100644 --- a/examples/line-mesh/line-mesh-example.cpp +++ b/examples/line-mesh/line-mesh-example.cpp @@ -18,6 +18,8 @@ // EXTERNAL INCLUDES #include #include +#include +#include // INTERNAL INCLUDES #include "shared/view.h" @@ -240,13 +242,15 @@ public: for( int i = 0; i < 3; ++i ) { - Property::Map labelMap; - labelMap[ "text" ] = labels[i]; - labelMap[ "textColor" ] = Vector4( 0.8f, 0.8f, 0.8f, 1.0f ); - Dali::Toolkit::RadioButton radio = Dali::Toolkit::RadioButton::New(); - radio.SetProperty( Dali::Toolkit::Button::Property::LABEL, labelMap ); + radio.SetProperty( Toolkit::Button::Property::LABEL, + Property::Map() + .Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT ) + .Add( Toolkit::TextVisual::Property::TEXT, labels[i] ) + .Add( Toolkit::TextVisual::Property::TEXT_COLOR, Vector4( 0.8f, 0.8f, 0.8f, 1.0f ) ) + ); + radio.SetParentOrigin( ParentOrigin::TOP_LEFT ); radio.SetAnchorPoint( AnchorPoint::TOP_LEFT ); radio.SetSelected( i == 0 );