Commit 8393ca0164e4883e9158e0a1b887ca96657789f1
[dali_1.2.25] Merge branch 'devel/master'
Change-Id: I781b71897d50a4230a6215ce18992fcdb59f5e3b
Showing
2 changed files
with
14 additions
and
16 deletions
examples/cube-transition-effect/cube-transition-effect-example.cpp
| @@ -25,6 +25,7 @@ | @@ -25,6 +25,7 @@ | ||
| 25 | #include <dali/dali.h> | 25 | #include <dali/dali.h> |
| 26 | #include <dali-toolkit/dali-toolkit.h> | 26 | #include <dali-toolkit/dali-toolkit.h> |
| 27 | #include <dali-toolkit/devel-api/controls/buttons/button-devel.h> | 27 | #include <dali-toolkit/devel-api/controls/buttons/button-devel.h> |
| 28 | +#include <dali-toolkit/devel-api/controls/buttons/toggle-button.h> | ||
| 28 | #include <dali-toolkit/devel-api/transition-effects/cube-transition-effect.h> | 29 | #include <dali-toolkit/devel-api/transition-effects/cube-transition-effect.h> |
| 29 | #include <dali-toolkit/devel-api/transition-effects/cube-transition-cross-effect.h> | 30 | #include <dali-toolkit/devel-api/transition-effects/cube-transition-cross-effect.h> |
| 30 | #include <dali-toolkit/devel-api/transition-effects/cube-transition-fold-effect.h> | 31 | #include <dali-toolkit/devel-api/transition-effects/cube-transition-fold-effect.h> |
| @@ -192,8 +193,6 @@ private: | @@ -192,8 +193,6 @@ private: | ||
| 192 | 193 | ||
| 193 | Vector2 mPanPosition; | 194 | Vector2 mPanPosition; |
| 194 | Vector2 mPanDisplacement; | 195 | Vector2 mPanDisplacement; |
| 195 | - | ||
| 196 | - Toolkit::PushButton mEffectChangeButton; | ||
| 197 | }; | 196 | }; |
| 198 | 197 | ||
| 199 | CubeTransitionApp::CubeTransitionApp( Application& application ) | 198 | CubeTransitionApp::CubeTransitionApp( Application& application ) |
| @@ -218,12 +217,18 @@ void CubeTransitionApp::OnInit( Application& application ) | @@ -218,12 +217,18 @@ void CubeTransitionApp::OnInit( Application& application ) | ||
| 218 | mContent = DemoHelper::CreateView( application, mView, mToolBar, "", TOOLBAR_IMAGE, "" ); | 217 | mContent = DemoHelper::CreateView( application, mView, mToolBar, "", TOOLBAR_IMAGE, "" ); |
| 219 | mContent.SetBehavior( Layer::LAYER_3D ); | 218 | mContent.SetBehavior( Layer::LAYER_3D ); |
| 220 | 219 | ||
| 221 | - // Add an effect-changing button on the right of the tool bar. | ||
| 222 | - mEffectChangeButton = Toolkit::PushButton::New(); | ||
| 223 | - mEffectChangeButton.SetProperty( Toolkit::DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL, EFFECT_WAVE_IMAGE ); | ||
| 224 | - mEffectChangeButton.SetProperty( Toolkit::DevelButton::Property::SELECTED_BACKGROUND_VISUAL, EFFECT_WAVE_IMAGE_SELECTED ); | ||
| 225 | - mEffectChangeButton.ClickedSignal().Connect( this, &CubeTransitionApp::OnEffectButtonClicked ); | ||
| 226 | - mToolBar.AddControl( mEffectChangeButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); | 220 | + |
| 221 | + // Add an effect changing toggle button | ||
| 222 | + Toolkit::ToggleButton effectChangeToggleButton = Toolkit::ToggleButton::ToggleButton::New(); | ||
| 223 | + | ||
| 224 | + effectChangeToggleButton.SetProperty( Toolkit::ToggleButton::Property::STATE_VISUALS, | ||
| 225 | + Property::Array().Add( EFFECT_WAVE_IMAGE ) | ||
| 226 | + .Add( EFFECT_CROSS_IMAGE) | ||
| 227 | + .Add( EFFECT_FOLD_IMAGE ) | ||
| 228 | + ); | ||
| 229 | + | ||
| 230 | + effectChangeToggleButton.ClickedSignal().Connect( this, &CubeTransitionApp::OnEffectButtonClicked ); | ||
| 231 | + mToolBar.AddControl( effectChangeToggleButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); | ||
| 227 | 232 | ||
| 228 | // Add title to the tool bar. | 233 | // Add title to the tool bar. |
| 229 | mTitle = DemoHelper::CreateToolBarLabel( APPLICATION_TITLE_WAVE ); | 234 | mTitle = DemoHelper::CreateToolBarLabel( APPLICATION_TITLE_WAVE ); |
| @@ -325,23 +330,16 @@ bool CubeTransitionApp::OnEffectButtonClicked( Toolkit::Button button ) | @@ -325,23 +330,16 @@ bool CubeTransitionApp::OnEffectButtonClicked( Toolkit::Button button ) | ||
| 325 | { | 330 | { |
| 326 | mCurrentEffect = mCubeCrossEffect; | 331 | mCurrentEffect = mCubeCrossEffect; |
| 327 | mTitle.SetProperty( TextLabel::Property::TEXT, std::string(APPLICATION_TITLE_CROSS) ); | 332 | mTitle.SetProperty( TextLabel::Property::TEXT, std::string(APPLICATION_TITLE_CROSS) ); |
| 328 | - mEffectChangeButton.SetProperty( Toolkit::DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL, EFFECT_CROSS_IMAGE ); | ||
| 329 | - mEffectChangeButton.SetProperty( Toolkit::DevelButton::Property::SELECTED_BACKGROUND_VISUAL, EFFECT_CROSS_IMAGE_SELECTED ); | ||
| 330 | - | ||
| 331 | } | 333 | } |
| 332 | else if(mCurrentEffect == mCubeCrossEffect) | 334 | else if(mCurrentEffect == mCubeCrossEffect) |
| 333 | { | 335 | { |
| 334 | mCurrentEffect = mCubeFoldEffect; | 336 | mCurrentEffect = mCubeFoldEffect; |
| 335 | mTitle.SetProperty( TextLabel::Property::TEXT, std::string(APPLICATION_TITLE_FOLD) ); | 337 | mTitle.SetProperty( TextLabel::Property::TEXT, std::string(APPLICATION_TITLE_FOLD) ); |
| 336 | - mEffectChangeButton.SetProperty( Toolkit::DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL, EFFECT_FOLD_IMAGE ); | ||
| 337 | - mEffectChangeButton.SetProperty( Toolkit::DevelButton::Property::SELECTED_BACKGROUND_VISUAL, EFFECT_FOLD_IMAGE_SELECTED ); | ||
| 338 | } | 338 | } |
| 339 | else | 339 | else |
| 340 | { | 340 | { |
| 341 | mCurrentEffect = mCubeWaveEffect; | 341 | mCurrentEffect = mCubeWaveEffect; |
| 342 | mTitle.SetProperty( TextLabel::Property::TEXT, std::string(APPLICATION_TITLE_WAVE) ); | 342 | mTitle.SetProperty( TextLabel::Property::TEXT, std::string(APPLICATION_TITLE_WAVE) ); |
| 343 | - mEffectChangeButton.SetProperty( Toolkit::DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL, EFFECT_WAVE_IMAGE ); | ||
| 344 | - mEffectChangeButton.SetProperty( Toolkit::DevelButton::Property::SELECTED_BACKGROUND_VISUAL, EFFECT_WAVE_IMAGE_SELECTED ); | ||
| 345 | } | 343 | } |
| 346 | mContent.Add( mCurrentEffect ); | 344 | mContent.Add( mCurrentEffect ); |
| 347 | 345 |
packaging/com.samsung.dali-demo.spec
| @@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
| 2 | 2 | ||
| 3 | Name: com.samsung.dali-demo | 3 | Name: com.samsung.dali-demo |
| 4 | Summary: The OpenGLES Canvas Core Demo | 4 | Summary: The OpenGLES Canvas Core Demo |
| 5 | -Version: 1.2.24 | 5 | +Version: 1.2.25 |
| 6 | Release: 1 | 6 | Release: 1 |
| 7 | Group: System/Libraries | 7 | Group: System/Libraries |
| 8 | License: Apache-2.0 | 8 | License: Apache-2.0 |