From 6fb1602ff2c47421e2cf3cc42b49b3bdbabeaacf Mon Sep 17 00:00:00 2001 From: Agnelo Vaz Date: Thu, 8 Dec 2016 15:04:38 +0000 Subject: [PATCH] Updating mesh example to work with button upgrade Change-Id: Iddf64b834aec8b5c75317c7dac78404f19346236 --- examples/line-mesh/line-mesh-example.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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 ); -- 2.7.4