diff --git a/examples/cluster/cluster-example.cpp b/examples/cluster/cluster-example.cpp index 7246878..0bc4532 100644 --- a/examples/cluster/cluster-example.cpp +++ b/examples/cluster/cluster-example.cpp @@ -456,8 +456,8 @@ public: // fitting it inside a quarter of the stage area with the conservative BOX // filter mode: Image bg = ResourceImage::New( CLUSTER_BACKGROUND_IMAGE_PATH, Dali::ImageDimensions( stageSize.x * 0.5f, stageSize.y * 0.5f ), Dali::FittingMode::SHRINK_TO_FIT, Dali::SamplingMode::BOX ); - ImageActor image = ImageActor::New(bg); - clusterActor.SetBackgroundImage(image); + Control clusterControl = Control::DownCast( clusterActor ); + clusterControl.SetBackgroundImage( bg ); // Add actors (pictures) as the children of the cluster for (unsigned int i = 0; (i < style.GetMaximumNumberOfChildren()) && (*paths); i++, paths++) diff --git a/examples/cluster/cluster-impl.cpp b/examples/cluster/cluster-impl.cpp index 3092b7c..ea54014 100644 --- a/examples/cluster/cluster-impl.cpp +++ b/examples/cluster/cluster-impl.cpp @@ -374,23 +374,6 @@ void Cluster::RestoreChild( unsigned int index, AlphaFunction alpha, const TimeP } } -void Cluster::SetBackgroundImage( Actor image ) -{ - // Replaces the background image. - if(mBackgroundImage && mBackgroundImage.GetParent()) - { - mBackgroundImage.GetParent().Remove(mBackgroundImage); - } - - mBackgroundImage = image; - Self().Add(mBackgroundImage); - - mBackgroundImage.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - mBackgroundImage.SetParentOrigin( ParentOrigin::TOP_LEFT ); - - UpdateBackground(0.0f); -} - void Cluster::SetTitle( Actor text ) { // Replaces the title actor. diff --git a/examples/cluster/cluster-impl.h b/examples/cluster/cluster-impl.h index a81a5ea..cf3837c 100644 --- a/examples/cluster/cluster-impl.h +++ b/examples/cluster/cluster-impl.h @@ -156,11 +156,6 @@ public: void RestoreChild( unsigned int index, AlphaFunction alpha, const TimePeriod& period, bool front ); /** - * @copydoc Demo::Cluster::SetBackgroundImage - */ - void SetBackgroundImage( Actor image ); - - /** * @copydoc Demo::Cluster::SetTitle */ void SetTitle( Actor text ); diff --git a/examples/cluster/cluster.cpp b/examples/cluster/cluster.cpp index 76b8cf6..3706301 100644 --- a/examples/cluster/cluster.cpp +++ b/examples/cluster/cluster.cpp @@ -127,11 +127,6 @@ void Cluster::RestoreChild( unsigned int index, AlphaFunction alpha, const TimeP GetImpl(*this).RestoreChild( index, alpha, period, front ); } -void Cluster::SetBackgroundImage( Actor image ) -{ - GetImpl(*this).SetBackgroundImage(image); -} - void Cluster::SetTitle( Actor text ) { GetImpl(*this).SetTitle(text); diff --git a/examples/cluster/cluster.h b/examples/cluster/cluster.h index 07a08dc..090e230 100644 --- a/examples/cluster/cluster.h +++ b/examples/cluster/cluster.h @@ -206,12 +206,6 @@ public: void RestoreChild( unsigned int index, AlphaFunction alpha, const TimePeriod& period, bool front = false ); /** - * Sets the background image. - * @param[in] image The background image. - */ - void SetBackgroundImage( Actor image ); - - /** * Sets the title. * * @param[in] text Title text. diff --git a/examples/cube-transition-effect/cube-transition-effect-example.cpp b/examples/cube-transition-effect/cube-transition-effect-example.cpp index fcd3680..a948f30 100644 --- a/examples/cube-transition-effect/cube-transition-effect-example.cpp +++ b/examples/cube-transition-effect/cube-transition-effect-example.cpp @@ -238,6 +238,7 @@ void CubeTransitionApp::OnInit( Application& application ) // Creates a default view with a default tool bar, the view is added to the stage. mContent = DemoHelper::CreateView( application, mView, mToolBar, "", TOOLBAR_IMAGE, "" ); + mContent.SetBehavior( Layer::LAYER_3D ); // Add an effect-changing button on the right of the tool bar. mImageWave = ResourceImage::New( EFFECT_WAVE_IMAGE ); diff --git a/examples/item-view/item-view-example.cpp b/examples/item-view/item-view-example.cpp index f999883..51a6588 100644 --- a/examples/item-view/item-view-example.cpp +++ b/examples/item-view/item-view-example.cpp @@ -250,7 +250,7 @@ public: mDeleteButton.SetParentOrigin(ParentOrigin::BOTTOM_RIGHT); mDeleteButton.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT); mDeleteButton.SetPosition( BUTTON_BORDER, BUTTON_BORDER ); - mDeleteButton.SetDrawMode( DrawMode::OVERLAY ); + mDeleteButton.SetDrawMode( DrawMode::OVERLAY_2D ); mDeleteButton.SetButtonImage( ResourceImage::New( DELETE_IMAGE ) ); mDeleteButton.SetSelectedImage( ResourceImage::New( DELETE_IMAGE_SELECTED ) ); mDeleteButton.SetBackgroundImage( ResourceImage::New( TOOLBAR_IMAGE ) ); @@ -265,7 +265,7 @@ public: mInsertButton.SetParentOrigin(ParentOrigin::BOTTOM_RIGHT); mInsertButton.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT); mInsertButton.SetPosition( BUTTON_BORDER, BUTTON_BORDER ); - mInsertButton.SetDrawMode( DrawMode::OVERLAY ); + mInsertButton.SetDrawMode( DrawMode::OVERLAY_2D ); mInsertButton.SetButtonImage( ResourceImage::New( INSERT_IMAGE ) ); mInsertButton.SetSelectedImage( ResourceImage::New( INSERT_IMAGE_SELECTED ) ); mInsertButton.SetBackgroundImage( ResourceImage::New( TOOLBAR_IMAGE ) ); @@ -280,7 +280,7 @@ public: mReplaceButton.SetParentOrigin(ParentOrigin::BOTTOM_RIGHT); mReplaceButton.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT); mReplaceButton.SetPosition( BUTTON_BORDER, BUTTON_BORDER ); - mReplaceButton.SetDrawMode( DrawMode::OVERLAY ); + mReplaceButton.SetDrawMode( DrawMode::OVERLAY_2D ); mReplaceButton.SetButtonImage( ResourceImage::New( REPLACE_IMAGE ) ); mReplaceButton.SetSelectedImage( ResourceImage::New( REPLACE_IMAGE_SELECTED ) ); mReplaceButton.SetBackgroundImage( ResourceImage::New( TOOLBAR_IMAGE ) ); @@ -298,6 +298,7 @@ public: // Display item view on the stage stage.Add( mItemView ); + stage.GetRootLayer().SetBehavior( Layer::LAYER_3D ); // Create the layouts mSpiralLayout = DefaultItemLayout::New( DefaultItemLayout::SPIRAL ); diff --git a/examples/line-mesh/line-mesh-example.cpp b/examples/line-mesh/line-mesh-example.cpp index 642441d..6388956 100644 --- a/examples/line-mesh/line-mesh-example.cpp +++ b/examples/line-mesh/line-mesh-example.cpp @@ -93,7 +93,7 @@ Geometry CreateGeometry() // Create indices unsigned int indexData[10] = { 0, 1, 1, 2, 2, 3, 3, 4, 4, 0 }; Property::Map indexFormat; - indexFormat["indices"] = Property::UNSIGNED_INTEGER; + indexFormat["indices"] = Property::INTEGER; PropertyBuffer indices = PropertyBuffer::New( indexFormat, sizeof(indexData)/sizeof(indexData[0]) ); indices.SetData(indexData); diff --git a/examples/mesh-sorting/mesh-sorting-example.cpp b/examples/mesh-sorting/mesh-sorting-example.cpp index 248a4c3..39b26e4 100644 --- a/examples/mesh-sorting/mesh-sorting-example.cpp +++ b/examples/mesh-sorting/mesh-sorting-example.cpp @@ -104,7 +104,7 @@ Geometry CreateGeometry() // Create indices unsigned int indexData[6] = { 0, 3, 1, 0, 2, 3 }; Property::Map indexFormat; - indexFormat["indices"] = Property::UNSIGNED_INTEGER; + indexFormat["indices"] = Property::INTEGER; PropertyBuffer indices = PropertyBuffer::New( indexFormat, 6 ); indices.SetData(indexData); diff --git a/examples/new-window/new-window-example.cpp b/examples/new-window/new-window-example.cpp index 889e038..a8d6e0b 100644 --- a/examples/new-window/new-window-example.cpp +++ b/examples/new-window/new-window-example.cpp @@ -441,7 +441,7 @@ Geometry NewWindowController::CreateMeshGeometry() // Specify all the faces unsigned int indexData[12] = { 0,1,3,0,2,4,0,3,4,0,2,1 }; Property::Map indexFormat; - indexFormat["indices"] = Property::UNSIGNED_INTEGER; + indexFormat["indices"] = Property::INTEGER; PropertyBuffer indices = PropertyBuffer::New( indexFormat, 12 ); indices.SetData( indexData ); diff --git a/examples/radial-menu/radial-sweep-view-impl.cpp b/examples/radial-menu/radial-sweep-view-impl.cpp index 85dbc47..9c791c7 100644 --- a/examples/radial-menu/radial-sweep-view-impl.cpp +++ b/examples/radial-menu/radial-sweep-view-impl.cpp @@ -336,7 +336,7 @@ void RadialSweepViewImpl::CreateStencil( Radian initialSector ) unsigned int indexData[15] = { 0,1,2,0,2,3,0,3,4,0,4,5,0,5,6 }; Property::Map indexFormat; - indexFormat["indices"] = Property::UNSIGNED_INTEGER; + indexFormat["indices"] = Property::INTEGER; PropertyBuffer indices = PropertyBuffer::New( indexFormat, 15u ); indices.SetData( indexData ); diff --git a/examples/text-field/text-field-example.cpp b/examples/text-field/text-field-example.cpp index da5d43e..bd00911 100644 --- a/examples/text-field/text-field-example.cpp +++ b/examples/text-field/text-field-example.cpp @@ -99,6 +99,9 @@ public: Stage stage = Stage::GetCurrent(); Vector2 stageSize = stage.GetSize(); + // Remove previously hidden pop-up + UnparentAndReset(mPopup); + // Launch a pop-up containing TextField mField = CreateTextField( stageSize, mButtonLabel ); mPopup = CreatePopup( stageSize.width * 0.8f ); @@ -117,6 +120,7 @@ public: field.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT ); field.SetProperty( TextField::Property::TEXT, text ); field.SetProperty( TextField::Property::TEXT_COLOR, Vector4( 0.0f, 1.0f, 1.0f, 1.0f ) ); // CYAN + field.SetProperty( TextField::Property::PRIMARY_CURSOR_COLOR, Color::WHITE ); field.SetProperty( TextField::Property::PLACEHOLDER_TEXT, "Unnamed folder" ); field.SetProperty( TextField::Property::PLACEHOLDER_TEXT_FOCUSED, "Enter folder name." ); field.SetProperty( TextField::Property::DECORATION_BOUNDING_BOX, Rect( BORDER_WIDTH, BORDER_WIDTH, stageSize.width - BORDER_WIDTH*2, stageSize.height - BORDER_WIDTH*2 ) ); @@ -154,7 +158,6 @@ public: mPopup.Hide(); } mField.Reset(); - mPopup.Reset(); } bool OnPopupTouched( Actor actor, const TouchEvent& event ) diff --git a/examples/text-label/text-label-example.cpp b/examples/text-label/text-label-example.cpp index 9d12f7d..c7e8555 100644 --- a/examples/text-label/text-label-example.cpp +++ b/examples/text-label/text-label-example.cpp @@ -107,7 +107,7 @@ public: mContainer.SetParentOrigin( ParentOrigin::CENTER ); mLayoutSize = Vector2(stageSize.width*0.6f, stageSize.width*0.6f); mContainer.SetSize( mLayoutSize ); - mContainer.SetDrawMode( DrawMode::OVERLAY ); + mContainer.SetDrawMode( DrawMode::OVERLAY_2D ); stage.Add( mContainer ); // Resize the center layout when the corner is grabbed diff --git a/examples/textured-mesh/textured-mesh-example.cpp b/examples/textured-mesh/textured-mesh-example.cpp index 04b3e7b..3b65701 100644 --- a/examples/textured-mesh/textured-mesh-example.cpp +++ b/examples/textured-mesh/textured-mesh-example.cpp @@ -81,7 +81,7 @@ Geometry CreateGeometry() // Create indices unsigned int indexData[6] = { 0, 3, 1, 0, 2, 3 }; Property::Map indexFormat; - indexFormat["indices"] = Property::UNSIGNED_INTEGER; + indexFormat["indices"] = Property::INTEGER; PropertyBuffer indices = PropertyBuffer::New( indexFormat, sizeof(indexData)/sizeof(indexData[0]) ); indices.SetData(indexData); diff --git a/packaging/com.samsung.dali-demo.spec b/packaging/com.samsung.dali-demo.spec index 1d29d67..2610fe0 100755 --- a/packaging/com.samsung.dali-demo.spec +++ b/packaging/com.samsung.dali-demo.spec @@ -2,7 +2,7 @@ Name: com.samsung.dali-demo Summary: The OpenGLES Canvas Core Demo -Version: 1.0.48 +Version: 1.0.49 Release: 1 Group: System/Libraries License: Apache-2.0 diff --git a/resources/scripts/animated-colors.json b/resources/scripts/animated-colors.json index e60b7ab..bcb6133 100644 --- a/resources/scripts/animated-colors.json +++ b/resources/scripts/animated-colors.json @@ -18,7 +18,7 @@ "stage": [ { "type": "Control", - "draw-mode": "OVERLAY", + "draw-mode": "OVERLAY_2D", "actors": [ { "type": "Control", diff --git a/resources/scripts/background-color.json b/resources/scripts/background-color.json index 0959179..9895e12 100644 --- a/resources/scripts/background-color.json +++ b/resources/scripts/background-color.json @@ -19,7 +19,7 @@ // A TextLabel with a red background { "type": "TextLabel", - "draw-mode": "OVERLAY", + "draw-mode": "OVERLAY_2D", "text": "Hello World", "parent-origin": "TOP_CENTER", "anchor-point": "TOP_CENTER", diff --git a/resources/scripts/table-view.json b/resources/scripts/table-view.json index 6934759..f43a8a5 100644 --- a/resources/scripts/table-view.json +++ b/resources/scripts/table-view.json @@ -44,7 +44,6 @@ "type":"TableView", "background-color": [0.5,0.5,0,1], "parent-origin": "CENTER", - "draw-mode": "OVERLAY", "size":[400,400,1], "rows": 4, "columns": 4, diff --git a/resources/style/demo-theme.json b/resources/style/demo-theme.json index 79acc25..5b35adc 100644 --- a/resources/style/demo-theme.json +++ b/resources/style/demo-theme.json @@ -43,14 +43,33 @@ distributing this software or its derivatives. { "point-size":13 }, - + "textselectionpopuplabel": + { + "point-size":18 + }, + "textselectionpopup": + { + "popup-max-size":[400,100], + "option-divider-size":[2,0], + "popup-divider-color":[0.23,0.72,0.8,0.11], + "popup-icon-color":[1.0,1.0,1.0,1.0], + "popup-pressed-color":[0.24,0.72,0.8,0.11], + "background-image": { + "filename": "{DALI_IMAGE_DIR}selection-popup-bg.9.png" + } + }, "textfield": { "font-family":"HelveticaNeue", "font-style":"Regular", - "point-size":18 + "point-size":18, + "primary-cursor-color":[0.75,0.96,1.0,1.0], + "secondary-cursor-color":[1.0,0.71,0.9,1.0], + "selection-highlight-color":[0.75,0.96,1.0,1.0], + "grab-handle-image":"{DALI_IMAGE_DIR}cursor_handler_center.png", + "selection-handle-image-left":"{DALI_IMAGE_DIR}selection_handle_left.png", + "selection-handle-image-right":"{DALI_IMAGE_DIR}selection_handle_right.png" }, - "scrollview": { "overshoot-effect-color":"B018" diff --git a/resources/style/mobile/demo-theme.json b/resources/style/mobile/demo-theme.json index 4328b32..579bb81 100644 --- a/resources/style/mobile/demo-theme.json +++ b/resources/style/mobile/demo-theme.json @@ -25,7 +25,8 @@ distributing this software or its derivatives. "textlabel": { "font-family":"SamsungSans", - "font-style":"Regular" + "font-style":"Regular", + "point-size":18 }, "textlabel-font-size-0": @@ -63,11 +64,31 @@ distributing this software or its derivatives. { "point-size":10 }, - + "textselectionpopuplabel": + { + "point-size":8 + }, + "textselectionpopup": + { + "popup-max-size":[400,100], + "option-divider-size":[2,0], + "popup-divider-color":[0.23,0.72,0.8,0.11], + "popup-icon-color":[1.0,1.0,1.0,1.0], + "popup-pressed-color":[0.24,0.72,0.8,0.11], + "background-image": { + "filename": "{DALI_IMAGE_DIR}selection-popup-bg.9.png" + } + }, "textfield": { "font-family":"SamsungSans", - "font-style":"Regular" + "font-style":"Regular", + "primary-cursor-color":[0.0,0.71,0.9,1.0], + "secondary-cursor-color":[0.0,0.71,0.9,1.0], + "selection-highlight-color":[0.75,0.96,1.0,1.0], + "grab-handle-image":"{DALI_IMAGE_DIR}cursor_handler_center.png", + "selection-handle-image-left":"{DALI_IMAGE_DIR}selection_handle_left.png", + "selection-handle-image-right":"{DALI_IMAGE_DIR}selection_handle_right.png" }, "textfield-font-size-0":