Commit ad1313b2bb8ee3449d4faea7340cc8c2fbedf40f
[dali_1.0.48] Merge branch 'devel/master'
Change-Id: I8cf011d2c88f6a1547393af7a3d7d34951feb9f6
Showing
53 changed files
with
246 additions
and
191 deletions
examples/atlas/atlas-example.cpp
| @@ -31,6 +31,7 @@ namespace | @@ -31,6 +31,7 @@ namespace | ||
| 31 | const char * const BACKGROUND_IMAGE( DALI_IMAGE_DIR "background-gradient.jpg" ); | 31 | const char * const BACKGROUND_IMAGE( DALI_IMAGE_DIR "background-gradient.jpg" ); |
| 32 | const char * const TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" ); | 32 | const char * const TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" ); |
| 33 | const char * const LOSE_CONTEXT_IMAGE( DALI_IMAGE_DIR "icon-cluster-wobble.png" ); | 33 | const char * const LOSE_CONTEXT_IMAGE( DALI_IMAGE_DIR "icon-cluster-wobble.png" ); |
| 34 | +const char * const LOSE_CONTEXT_IMAGE_SELECTED( DALI_IMAGE_DIR "icon-cluster-wobble-selected.png" ); | ||
| 34 | 35 | ||
| 35 | Application gApplication; | 36 | Application gApplication; |
| 36 | AtlasController* gAtlasController(NULL); | 37 | AtlasController* gAtlasController(NULL); |
| @@ -71,7 +72,8 @@ public: | @@ -71,7 +72,8 @@ public: | ||
| 71 | "Atlas" ); | 72 | "Atlas" ); |
| 72 | 73 | ||
| 73 | mLoseContextButton = Toolkit::PushButton::New(); | 74 | mLoseContextButton = Toolkit::PushButton::New(); |
| 74 | - mLoseContextButton.SetBackgroundImage( ResourceImage::New( LOSE_CONTEXT_IMAGE ) ); | 75 | + mLoseContextButton.SetButtonImage( ResourceImage::New( LOSE_CONTEXT_IMAGE ) ); |
| 76 | + mLoseContextButton.SetSelectedImage( ResourceImage::New( LOSE_CONTEXT_IMAGE_SELECTED ) ); | ||
| 75 | mLoseContextButton.ClickedSignal().Connect( this, &AtlasController::OnLoseContextButtonClicked ); | 77 | mLoseContextButton.ClickedSignal().Connect( this, &AtlasController::OnLoseContextButtonClicked ); |
| 76 | mToolBar.AddControl( mLoseContextButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); | 78 | mToolBar.AddControl( mLoseContextButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); |
| 77 | 79 |
examples/bubble-effect/bubble-effect-example.cpp
| @@ -27,7 +27,9 @@ namespace | @@ -27,7 +27,9 @@ namespace | ||
| 27 | const char * const TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" ); | 27 | const char * const TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" ); |
| 28 | const char * const APPLICATION_TITLE( "Bubble Effect" ); | 28 | const char * const APPLICATION_TITLE( "Bubble Effect" ); |
| 29 | const char * const CHANGE_BACKGROUND_ICON( DALI_IMAGE_DIR "icon-change.png" ); | 29 | const char * const CHANGE_BACKGROUND_ICON( DALI_IMAGE_DIR "icon-change.png" ); |
| 30 | +const char * const CHANGE_BACKGROUND_ICON_SELECTED( DALI_IMAGE_DIR "icon-change-selected.png" ); | ||
| 30 | const char * const CHANGE_BUBBLE_SHAPE_ICON( DALI_IMAGE_DIR "icon-replace.png" ); | 31 | const char * const CHANGE_BUBBLE_SHAPE_ICON( DALI_IMAGE_DIR "icon-replace.png" ); |
| 32 | +const char * const CHANGE_BUBBLE_SHAPE_ICON_SELECTED( DALI_IMAGE_DIR "icon-replace-selected.png" ); | ||
| 31 | 33 | ||
| 32 | const char* BACKGROUND_IMAGES[]= | 34 | const char* BACKGROUND_IMAGES[]= |
| 33 | { | 35 | { |
| @@ -109,7 +111,8 @@ private: | @@ -109,7 +111,8 @@ private: | ||
| 109 | 111 | ||
| 110 | // Add a button to change background. (right of toolbar) | 112 | // Add a button to change background. (right of toolbar) |
| 111 | mChangeBackgroundButton = Toolkit::PushButton::New(); | 113 | mChangeBackgroundButton = Toolkit::PushButton::New(); |
| 112 | - mChangeBackgroundButton.SetBackgroundImage( ResourceImage::New( CHANGE_BACKGROUND_ICON ) ); | 114 | + mChangeBackgroundButton.SetButtonImage( ResourceImage::New( CHANGE_BACKGROUND_ICON ) ); |
| 115 | + mChangeBackgroundButton.SetSelectedImage( ResourceImage::New( CHANGE_BACKGROUND_ICON_SELECTED ) ); | ||
| 113 | mChangeBackgroundButton.ClickedSignal().Connect( this, &BubbleEffectExample::OnChangeIconClicked ); | 116 | mChangeBackgroundButton.ClickedSignal().Connect( this, &BubbleEffectExample::OnChangeIconClicked ); |
| 114 | toolBar.AddControl( mChangeBackgroundButton, | 117 | toolBar.AddControl( mChangeBackgroundButton, |
| 115 | DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, | 118 | DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, |
| @@ -117,7 +120,8 @@ private: | @@ -117,7 +120,8 @@ private: | ||
| 117 | DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); | 120 | DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); |
| 118 | // Add a button to change bubble shape. ( left of bar ) | 121 | // Add a button to change bubble shape. ( left of bar ) |
| 119 | mChangeBubbleShapeButton = Toolkit::PushButton::New(); | 122 | mChangeBubbleShapeButton = Toolkit::PushButton::New(); |
| 120 | - mChangeBubbleShapeButton.SetBackgroundImage( ResourceImage::New( CHANGE_BUBBLE_SHAPE_ICON ) ); | 123 | + mChangeBubbleShapeButton.SetButtonImage( ResourceImage::New( CHANGE_BUBBLE_SHAPE_ICON ) ); |
| 124 | + mChangeBubbleShapeButton.SetSelectedImage( ResourceImage::New( CHANGE_BUBBLE_SHAPE_ICON_SELECTED ) ); | ||
| 121 | mChangeBubbleShapeButton.ClickedSignal().Connect( this, &BubbleEffectExample::OnChangeIconClicked ); | 125 | mChangeBubbleShapeButton.ClickedSignal().Connect( this, &BubbleEffectExample::OnChangeIconClicked ); |
| 122 | toolBar.AddControl( mChangeBubbleShapeButton, | 126 | toolBar.AddControl( mChangeBubbleShapeButton, |
| 123 | DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, | 127 | DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, |
examples/builder/examples.cpp
| @@ -53,6 +53,7 @@ namespace | @@ -53,6 +53,7 @@ namespace | ||
| 53 | const char* BACKGROUND_IMAGE( "" ); | 53 | const char* BACKGROUND_IMAGE( "" ); |
| 54 | const char* TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" ); | 54 | const char* TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" ); |
| 55 | const char* EDIT_IMAGE( DALI_IMAGE_DIR "icon-change.png" ); | 55 | const char* EDIT_IMAGE( DALI_IMAGE_DIR "icon-change.png" ); |
| 56 | +const char* EDIT_IMAGE_SELECTED( DALI_IMAGE_DIR "icon-change-selected.png" ); | ||
| 56 | 57 | ||
| 57 | std::string USER_DIRECTORY; | 58 | std::string USER_DIRECTORY; |
| 58 | 59 | ||
| @@ -512,7 +513,8 @@ public: | @@ -512,7 +513,8 @@ public: | ||
| 512 | 513 | ||
| 513 | // Create an edit mode button. (left of toolbar) | 514 | // Create an edit mode button. (left of toolbar) |
| 514 | Toolkit::PushButton editButton = Toolkit::PushButton::New(); | 515 | Toolkit::PushButton editButton = Toolkit::PushButton::New(); |
| 515 | - editButton.SetBackgroundImage( ResourceImage::New( EDIT_IMAGE ) ); | 516 | + editButton.SetButtonImage( ResourceImage::New( EDIT_IMAGE ) ); |
| 517 | + editButton.SetSelectedImage( ResourceImage::New( EDIT_IMAGE_SELECTED ) ); | ||
| 516 | editButton.ClickedSignal().Connect( this, &ExampleApp::OnToolSelectLayout); | 518 | editButton.ClickedSignal().Connect( this, &ExampleApp::OnToolSelectLayout); |
| 517 | editButton.SetLeaveRequired( true ); | 519 | editButton.SetLeaveRequired( true ); |
| 518 | mToolBar.AddControl( editButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalLeft, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); | 520 | mToolBar.AddControl( editButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalLeft, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); |
examples/buttons/buttons-example.cpp
| @@ -45,13 +45,6 @@ const char* const BIG_IMAGE_3 = DALI_IMAGE_DIR "gallery-large-13.jpg"; | @@ -45,13 +45,6 @@ const char* const BIG_IMAGE_3 = DALI_IMAGE_DIR "gallery-large-13.jpg"; | ||
| 45 | 45 | ||
| 46 | const char* const ENABLED_IMAGE = DALI_IMAGE_DIR "item-select-check.png"; | 46 | const char* const ENABLED_IMAGE = DALI_IMAGE_DIR "item-select-check.png"; |
| 47 | 47 | ||
| 48 | -const char* const PUSHBUTTON_PRESS_IMAGE = DALI_IMAGE_DIR "button-down.9.png"; | ||
| 49 | -const char* const PUSHBUTTON_DISABLED_IMAGE = DALI_IMAGE_DIR "button-disabled.9.png"; | ||
| 50 | -const char* const PUSHBUTTON_BUTTON_IMAGE = DALI_IMAGE_DIR "button-up.9.png"; | ||
| 51 | - | ||
| 52 | -const char* const CHECKBOX_UNSELECTED_IMAGE = DALI_IMAGE_DIR "checkbox-unselected.png"; | ||
| 53 | -const char* const CHECKBOX_SELECTED_IMAGE = DALI_IMAGE_DIR "checkbox-selected.png"; | ||
| 54 | - | ||
| 55 | const Vector4 BACKGROUND_COLOUR( 1.0f, 1.0f, 1.0f, 0.15f ); | 48 | const Vector4 BACKGROUND_COLOUR( 1.0f, 1.0f, 1.0f, 0.15f ); |
| 56 | 49 | ||
| 57 | // Layout sizes | 50 | // Layout sizes |
| @@ -198,10 +191,6 @@ class ButtonsController: public ConnectionTracker | @@ -198,10 +191,6 @@ class ButtonsController: public ConnectionTracker | ||
| 198 | mUpdateButton.SetLabel( "Select" ); | 191 | mUpdateButton.SetLabel( "Select" ); |
| 199 | mUpdateButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); | 192 | mUpdateButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); |
| 200 | 193 | ||
| 201 | - mUpdateButton.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); | ||
| 202 | - mUpdateButton.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) ); | ||
| 203 | - mUpdateButton.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); | ||
| 204 | - | ||
| 205 | mUpdateButton.ClickedSignal().Connect( this, &ButtonsController::OnButtonClicked ); | 194 | mUpdateButton.ClickedSignal().Connect( this, &ButtonsController::OnButtonClicked ); |
| 206 | 195 | ||
| 207 | radioGroup2Background.AddChild( mUpdateButton, Toolkit::TableView::CellPosition( 1, 0 ) ); | 196 | radioGroup2Background.AddChild( mUpdateButton, Toolkit::TableView::CellPosition( 1, 0 ) ); |
| @@ -296,41 +285,32 @@ class ButtonsController: public ConnectionTracker | @@ -296,41 +285,32 @@ class ButtonsController: public ConnectionTracker | ||
| 296 | 285 | ||
| 297 | contentTable.Add( checkBoxBackground ); | 286 | contentTable.Add( checkBoxBackground ); |
| 298 | 287 | ||
| 299 | - Dali::Image unselected = Dali::ResourceImage::New( CHECKBOX_UNSELECTED_IMAGE ); | ||
| 300 | - Dali::Image selected = Dali::ResourceImage::New( CHECKBOX_SELECTED_IMAGE ); | ||
| 301 | - | ||
| 302 | { | 288 | { |
| 303 | - Toolkit::CheckBoxButton checkBox = Toolkit::CheckBoxButton::New(); | ||
| 304 | - checkBox.SetName( "checkbox1" ); | ||
| 305 | - checkBox.SetBackgroundImage( unselected ); | ||
| 306 | - checkBox.SetSelectedImage( selected ); | ||
| 307 | - checkBox.SetLabel( "CheckBox1 is unselected" ); | ||
| 308 | - checkBox.StateChangedSignal().Connect( this, &ButtonsController::OnCheckBoxesSelected ); | ||
| 309 | - | ||
| 310 | - checkBoxBackground.Add( checkBox ); | 289 | + mCheckboxButton1 = Toolkit::CheckBoxButton::New(); |
| 290 | + mCheckboxButton1.SetName( "checkbox1" ); | ||
| 291 | + mCheckboxButton1.SetLabel( "CheckBox1 is unselected" ); | ||
| 292 | + mCheckboxButton1.StateChangedSignal().Connect( this, &ButtonsController::OnCheckBoxesSelected ); | ||
| 293 | + | ||
| 294 | + checkBoxBackground.Add( mCheckboxButton1 ); | ||
| 311 | } | 295 | } |
| 312 | 296 | ||
| 313 | { | 297 | { |
| 314 | - Toolkit::CheckBoxButton checkBox = Toolkit::CheckBoxButton::New(); | ||
| 315 | - checkBox.SetName( "checkbox2" ); | ||
| 316 | - checkBox.SetBackgroundImage( unselected ); | ||
| 317 | - checkBox.SetSelectedImage( selected ); | ||
| 318 | - checkBox.SetLabel( "CheckBox2 is selected" ); | ||
| 319 | - checkBox.SetSelected( true ); | ||
| 320 | - checkBox.StateChangedSignal().Connect( this, &ButtonsController::OnCheckBoxesSelected ); | ||
| 321 | - | ||
| 322 | - checkBoxBackground.Add( checkBox ); | 298 | + mCheckboxButton2 = Toolkit::CheckBoxButton::New(); |
| 299 | + mCheckboxButton2.SetName( "checkbox2" ); | ||
| 300 | + mCheckboxButton2.SetLabel( "CheckBox2 is selected" ); | ||
| 301 | + mCheckboxButton2.SetSelected( true ); | ||
| 302 | + mCheckboxButton2.StateChangedSignal().Connect( this, &ButtonsController::OnCheckBoxesSelected ); | ||
| 303 | + | ||
| 304 | + checkBoxBackground.Add( mCheckboxButton2 ); | ||
| 323 | } | 305 | } |
| 324 | 306 | ||
| 325 | { | 307 | { |
| 326 | - Toolkit::CheckBoxButton checkBox = Toolkit::CheckBoxButton::New(); | ||
| 327 | - checkBox.SetName( "checkbox3" ); | ||
| 328 | - checkBox.SetBackgroundImage( unselected ); | ||
| 329 | - checkBox.SetSelectedImage( selected ); | ||
| 330 | - checkBox.SetLabel( "CheckBox3 is unselected" ); | ||
| 331 | - checkBox.StateChangedSignal().Connect( this, &ButtonsController::OnCheckBoxesSelected ); | ||
| 332 | - | ||
| 333 | - checkBoxBackground.Add( checkBox ); | 308 | + mCheckboxButton3 = Toolkit::CheckBoxButton::New(); |
| 309 | + mCheckboxButton3.SetName( "checkbox3" ); | ||
| 310 | + mCheckboxButton3.SetLabel( "CheckBox3 is unselected" ); | ||
| 311 | + mCheckboxButton3.StateChangedSignal().Connect( this, &ButtonsController::OnCheckBoxesSelected ); | ||
| 312 | + | ||
| 313 | + checkBoxBackground.Add( mCheckboxButton3 ); | ||
| 334 | } | 314 | } |
| 335 | 315 | ||
| 336 | // Create togglabe button | 316 | // Create togglabe button |
| @@ -347,19 +327,14 @@ class ButtonsController: public ConnectionTracker | @@ -347,19 +327,14 @@ class ButtonsController: public ConnectionTracker | ||
| 347 | 327 | ||
| 348 | contentTable.Add( toggleBackground ); | 328 | contentTable.Add( toggleBackground ); |
| 349 | 329 | ||
| 350 | - Toolkit::PushButton toggleButton = Toolkit::PushButton::New(); | ||
| 351 | - toggleButton.SetTogglableButton( true ); | ||
| 352 | - toggleButton.SetLabel( "Unselected" ); | ||
| 353 | - toggleButton.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); | ||
| 354 | - toggleButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT ); | ||
| 355 | - | ||
| 356 | - toggleButton.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); | ||
| 357 | - toggleButton.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) ); | ||
| 358 | - toggleButton.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); | 330 | + mToggleButton = Toolkit::PushButton::New(); |
| 331 | + mToggleButton.SetTogglableButton( true ); | ||
| 332 | + mToggleButton.SetLabel( "Unselected" ); | ||
| 333 | + mToggleButton.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); | ||
| 334 | + mToggleButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT ); | ||
| 335 | + mToggleButton.StateChangedSignal().Connect( this, &ButtonsController::OnButtonSelected ); | ||
| 359 | 336 | ||
| 360 | - toggleButton.StateChangedSignal().Connect( this, &ButtonsController::OnButtonSelected ); | ||
| 361 | - | ||
| 362 | - toggleBackground.Add( toggleButton ); | 337 | + toggleBackground.Add( mToggleButton ); |
| 363 | } | 338 | } |
| 364 | 339 | ||
| 365 | void OnKeyEvent( const KeyEvent& event ) | 340 | void OnKeyEvent( const KeyEvent& event ) |
| @@ -397,10 +372,30 @@ class ButtonsController: public ConnectionTracker | @@ -397,10 +372,30 @@ class ButtonsController: public ConnectionTracker | ||
| 397 | if( button.GetName() == "radio-select-enable" && button.IsSelected() == true ) | 372 | if( button.GetName() == "radio-select-enable" && button.IsSelected() == true ) |
| 398 | { | 373 | { |
| 399 | mUpdateButton.SetDisabled( false ); | 374 | mUpdateButton.SetDisabled( false ); |
| 375 | + | ||
| 376 | + mRadioButtonImage1.SetDisabled( false ); | ||
| 377 | + mRadioButtonImage2.SetDisabled( false ); | ||
| 378 | + mRadioButtonImage3.SetDisabled( false ); | ||
| 379 | + | ||
| 380 | + mCheckboxButton1.SetDisabled( false ); | ||
| 381 | + mCheckboxButton2.SetDisabled( false ); | ||
| 382 | + mCheckboxButton3.SetDisabled( false ); | ||
| 383 | + | ||
| 384 | + mToggleButton.SetDisabled( false ); | ||
| 400 | } | 385 | } |
| 401 | else if( button.GetName() == "radio-select-disable" && button.IsSelected() == true ) | 386 | else if( button.GetName() == "radio-select-disable" && button.IsSelected() == true ) |
| 402 | { | 387 | { |
| 403 | mUpdateButton.SetDisabled( true ); | 388 | mUpdateButton.SetDisabled( true ); |
| 389 | + | ||
| 390 | + mRadioButtonImage1.SetDisabled( true ); | ||
| 391 | + mRadioButtonImage2.SetDisabled( true ); | ||
| 392 | + mRadioButtonImage3.SetDisabled( true ); | ||
| 393 | + | ||
| 394 | + mCheckboxButton1.SetDisabled( true ); | ||
| 395 | + mCheckboxButton2.SetDisabled( true ); | ||
| 396 | + mCheckboxButton3.SetDisabled( true ); | ||
| 397 | + | ||
| 398 | + mToggleButton.SetDisabled( true ); | ||
| 404 | } | 399 | } |
| 405 | 400 | ||
| 406 | return true; | 401 | return true; |
| @@ -504,6 +499,11 @@ class ButtonsController: public ConnectionTracker | @@ -504,6 +499,11 @@ class ButtonsController: public ConnectionTracker | ||
| 504 | Toolkit::RadioButton mRadioButtonImage3; | 499 | Toolkit::RadioButton mRadioButtonImage3; |
| 505 | 500 | ||
| 506 | Toolkit::PushButton mUpdateButton; | 501 | Toolkit::PushButton mUpdateButton; |
| 502 | + Toolkit::PushButton mToggleButton; | ||
| 503 | + | ||
| 504 | + Toolkit::CheckBoxButton mCheckboxButton1; | ||
| 505 | + Toolkit::CheckBoxButton mCheckboxButton2; | ||
| 506 | + Toolkit::CheckBoxButton mCheckboxButton3; | ||
| 507 | 507 | ||
| 508 | Animation mAnimation; | 508 | Animation mAnimation; |
| 509 | float mLastPoint; | 509 | float mLastPoint; |
examples/cluster/cluster-example.cpp
| @@ -41,9 +41,13 @@ const char * const BACKGROUND_IMAGE( DALI_IMAGE_DIR "background-default.png" ); | @@ -41,9 +41,13 @@ const char * const BACKGROUND_IMAGE( DALI_IMAGE_DIR "background-default.png" ); | ||
| 41 | const char * const TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" ); | 41 | const char * const TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" ); |
| 42 | const char * const APPLICATION_TITLE( "Clusters" ); | 42 | const char * const APPLICATION_TITLE( "Clusters" ); |
| 43 | const char * const LAYOUT_NONE_IMAGE( DALI_IMAGE_DIR "icon-cluster-none.png" ); | 43 | const char * const LAYOUT_NONE_IMAGE( DALI_IMAGE_DIR "icon-cluster-none.png" ); |
| 44 | +const char * const LAYOUT_NONE_IMAGE_SELECTED( DALI_IMAGE_DIR "icon-cluster-none-selected.png" ); | ||
| 44 | const char * const LAYOUT_MOTION_BLUR_IMAGE( DALI_IMAGE_DIR "icon-cluster-wobble.png" ); | 45 | const char * const LAYOUT_MOTION_BLUR_IMAGE( DALI_IMAGE_DIR "icon-cluster-wobble.png" ); |
| 46 | +const char * const LAYOUT_MOTION_BLUR_IMAGE_SELECTED( DALI_IMAGE_DIR "icon-cluster-wobble-selected.png" ); | ||
| 45 | const char * const LAYOUT_CAROUSEL_IMAGE( DALI_IMAGE_DIR "icon-cluster-carousel.png" ); | 47 | const char * const LAYOUT_CAROUSEL_IMAGE( DALI_IMAGE_DIR "icon-cluster-carousel.png" ); |
| 48 | +const char * const LAYOUT_CAROUSEL_IMAGE_SELECTED( DALI_IMAGE_DIR "icon-cluster-carousel-selected.png" ); | ||
| 46 | const char * const LAYOUT_SPHERE_IMAGE( DALI_IMAGE_DIR "icon-cluster-sphere.png" ); | 49 | const char * const LAYOUT_SPHERE_IMAGE( DALI_IMAGE_DIR "icon-cluster-sphere.png" ); |
| 50 | +const char * const LAYOUT_SPHERE_IMAGE_SELECTED( DALI_IMAGE_DIR "icon-cluster-sphere-selected.png" ); | ||
| 47 | 51 | ||
| 48 | enum ClusterType | 52 | enum ClusterType |
| 49 | { | 53 | { |
| @@ -151,11 +155,11 @@ const float SPHERE_EFFECT_VERTICAL_DOMAIN = 0.15f; ///< In Sphere Effec | @@ -151,11 +155,11 @@ const float SPHERE_EFFECT_VERTICAL_DOMAIN = 0.15f; ///< In Sphere Effec | ||
| 151 | */ | 155 | */ |
| 152 | enum ExampleEffectType | 156 | enum ExampleEffectType |
| 153 | { | 157 | { |
| 154 | - NO_EFFECT, | 158 | + NO_EFFECT = 0, |
| 155 | MOTION_BLUR_EFFECT, | 159 | MOTION_BLUR_EFFECT, |
| 156 | CAROUSEL_EFFECT, | 160 | CAROUSEL_EFFECT, |
| 157 | SPHERE_EFFECT, | 161 | SPHERE_EFFECT, |
| 158 | - TOTAL_EFFECTS | 162 | + TOTAL_EFFECTS, |
| 159 | }; | 163 | }; |
| 160 | 164 | ||
| 161 | /** | 165 | /** |
| @@ -319,6 +323,13 @@ struct ShrinkConstraint | @@ -319,6 +323,13 @@ struct ShrinkConstraint | ||
| 319 | } | 323 | } |
| 320 | }; | 324 | }; |
| 321 | 325 | ||
| 326 | +struct ButtonImages | ||
| 327 | +{ | ||
| 328 | + Image mButtonImage; | ||
| 329 | + Image mSelectedImage; | ||
| 330 | +}; | ||
| 331 | + | ||
| 332 | + | ||
| 322 | } // unnamed namespace | 333 | } // unnamed namespace |
| 323 | 334 | ||
| 324 | /** | 335 | /** |
| @@ -379,10 +390,14 @@ public: | @@ -379,10 +390,14 @@ public: | ||
| 379 | mContentLayer.SetProperty(Layer::Property::BEHAVIOR, "Dali::Layer::LAYER_3D"); | 390 | mContentLayer.SetProperty(Layer::Property::BEHAVIOR, "Dali::Layer::LAYER_3D"); |
| 380 | 391 | ||
| 381 | // Create a effect toggle button. (right of toolbar) | 392 | // Create a effect toggle button. (right of toolbar) |
| 382 | - mLayoutButtonImages[ NO_EFFECT ] = ResourceImage::New( LAYOUT_NONE_IMAGE ); | ||
| 383 | - mLayoutButtonImages[ MOTION_BLUR_EFFECT ] = ResourceImage::New( LAYOUT_MOTION_BLUR_IMAGE ); | ||
| 384 | - mLayoutButtonImages[ CAROUSEL_EFFECT ] = ResourceImage::New( LAYOUT_CAROUSEL_IMAGE ); | ||
| 385 | - mLayoutButtonImages[ SPHERE_EFFECT ] = ResourceImage::New( LAYOUT_SPHERE_IMAGE ); | 393 | + mLayoutButtonImages[ NO_EFFECT ].mButtonImage = ResourceImage::New( LAYOUT_NONE_IMAGE ); |
| 394 | + mLayoutButtonImages[ NO_EFFECT ].mSelectedImage = ResourceImage::New( LAYOUT_NONE_IMAGE_SELECTED ); | ||
| 395 | + mLayoutButtonImages[ MOTION_BLUR_EFFECT ].mButtonImage = ResourceImage::New( LAYOUT_MOTION_BLUR_IMAGE ); | ||
| 396 | + mLayoutButtonImages[ MOTION_BLUR_EFFECT ].mSelectedImage = ResourceImage::New( LAYOUT_MOTION_BLUR_IMAGE_SELECTED ); | ||
| 397 | + mLayoutButtonImages[ CAROUSEL_EFFECT ].mButtonImage = ResourceImage::New( LAYOUT_CAROUSEL_IMAGE ); | ||
| 398 | + mLayoutButtonImages[ CAROUSEL_EFFECT ].mSelectedImage = ResourceImage::New( LAYOUT_CAROUSEL_IMAGE_SELECTED ); | ||
| 399 | + mLayoutButtonImages[ SPHERE_EFFECT ].mButtonImage = ResourceImage::New( LAYOUT_SPHERE_IMAGE ); | ||
| 400 | + mLayoutButtonImages[ SPHERE_EFFECT ].mSelectedImage = ResourceImage::New( LAYOUT_SPHERE_IMAGE_SELECTED ); | ||
| 386 | 401 | ||
| 387 | mLayoutButton = Toolkit::PushButton::New(); | 402 | mLayoutButton = Toolkit::PushButton::New(); |
| 388 | mLayoutButton.ClickedSignal().Connect( this, &ClusterController::OnEffectTouched ); | 403 | mLayoutButton.ClickedSignal().Connect( this, &ClusterController::OnEffectTouched ); |
| @@ -616,7 +631,8 @@ public: | @@ -616,7 +631,8 @@ public: | ||
| 616 | // Remove all shader-effects from mScrollView and it's children (the clusters) | 631 | // Remove all shader-effects from mScrollView and it's children (the clusters) |
| 617 | mScrollView.SetPosition(Vector3::ZERO); | 632 | mScrollView.SetPosition(Vector3::ZERO); |
| 618 | 633 | ||
| 619 | - mLayoutButton.SetBackgroundImage( mLayoutButtonImages[ type ] ); | 634 | + mLayoutButton.SetButtonImage( mLayoutButtonImages[ type ].mButtonImage ); |
| 635 | + mLayoutButton.SetSelectedImage( mLayoutButtonImages[ type ].mSelectedImage ); | ||
| 620 | 636 | ||
| 621 | for( std::vector<ClusterInfo>::iterator i = mClusterInfo.begin(); i != mClusterInfo.end(); ++i ) | 637 | for( std::vector<ClusterInfo>::iterator i = mClusterInfo.begin(); i != mClusterInfo.end(); ++i ) |
| 622 | { | 638 | { |
| @@ -768,23 +784,16 @@ private: | @@ -768,23 +784,16 @@ private: | ||
| 768 | ExampleEffectType mExampleEffect; ///< Current example effect. | 784 | ExampleEffectType mExampleEffect; ///< Current example effect. |
| 769 | 785 | ||
| 770 | Toolkit::PushButton mLayoutButton; ///< The layout button | 786 | Toolkit::PushButton mLayoutButton; ///< The layout button |
| 771 | - Image mLayoutButtonImages[TOTAL_EFFECTS]; ///< Image when no layout | 787 | + ButtonImages mLayoutButtonImages[TOTAL_EFFECTS]; ///< Image when no layout |
| 772 | }; | 788 | }; |
| 773 | 789 | ||
| 774 | -void RunTest(Application& app) | ||
| 775 | -{ | ||
| 776 | - ClusterController test(app); | ||
| 777 | - | ||
| 778 | - app.MainLoop(); | ||
| 779 | -} | ||
| 780 | - | ||
| 781 | // Entry point for Linux & Tizen applications | 790 | // Entry point for Linux & Tizen applications |
| 782 | // | 791 | // |
| 783 | int main(int argc, char **argv) | 792 | int main(int argc, char **argv) |
| 784 | { | 793 | { |
| 785 | Application app = Application::New(&argc, &argv, DALI_DEMO_THEME_PATH); | 794 | Application app = Application::New(&argc, &argv, DALI_DEMO_THEME_PATH); |
| 786 | - | ||
| 787 | - RunTest(app); | 795 | + ClusterController test(app); |
| 796 | + app.MainLoop(); | ||
| 788 | 797 | ||
| 789 | return 0; | 798 | return 0; |
| 790 | } | 799 | } |
examples/cube-transition-effect/cube-transition-effect-example.cpp
| @@ -42,10 +42,15 @@ const char * const APPLICATION_TITLE_WAVE( "Cube Transition: Wave" ); | @@ -42,10 +42,15 @@ const char * const APPLICATION_TITLE_WAVE( "Cube Transition: Wave" ); | ||
| 42 | const char * const APPLICATION_TITLE_CROSS( "Cube Transition: Cross" ); | 42 | const char * const APPLICATION_TITLE_CROSS( "Cube Transition: Cross" ); |
| 43 | const char * const APPLICATION_TITLE_FOLD( "Cube Transition: Fold" ); | 43 | const char * const APPLICATION_TITLE_FOLD( "Cube Transition: Fold" ); |
| 44 | const char * const EFFECT_WAVE_IMAGE( DALI_IMAGE_DIR "icon-effect-wave.png" ); | 44 | const char * const EFFECT_WAVE_IMAGE( DALI_IMAGE_DIR "icon-effect-wave.png" ); |
| 45 | +const char * const EFFECT_WAVE_IMAGE_SELECTED( DALI_IMAGE_DIR "icon-effect-wave-selected.png" ); | ||
| 45 | const char * const EFFECT_CROSS_IMAGE( DALI_IMAGE_DIR "icon-effect-cross.png" ); | 46 | const char * const EFFECT_CROSS_IMAGE( DALI_IMAGE_DIR "icon-effect-cross.png" ); |
| 47 | +const char * const EFFECT_CROSS_IMAGE_SELECTED( DALI_IMAGE_DIR "icon-effect-cross-selected.png" ); | ||
| 46 | const char * const EFFECT_FOLD_IMAGE( DALI_IMAGE_DIR "icon-effect-fold.png" ); | 48 | const char * const EFFECT_FOLD_IMAGE( DALI_IMAGE_DIR "icon-effect-fold.png" ); |
| 49 | +const char * const EFFECT_FOLD_IMAGE_SELECTED( DALI_IMAGE_DIR "icon-effect-fold-selected.png" ); | ||
| 47 | const char * const SLIDE_SHOW_START_ICON( DALI_IMAGE_DIR "icon-play.png" ); | 50 | const char * const SLIDE_SHOW_START_ICON( DALI_IMAGE_DIR "icon-play.png" ); |
| 51 | +const char * const SLIDE_SHOW_START_ICON_SELECTED( DALI_IMAGE_DIR "icon-play-selected.png" ); | ||
| 48 | const char * const SLIDE_SHOW_STOP_ICON( DALI_IMAGE_DIR "icon-stop.png" ); | 52 | const char * const SLIDE_SHOW_STOP_ICON( DALI_IMAGE_DIR "icon-stop.png" ); |
| 53 | +const char * const SLIDE_SHOW_STOP_ICON_SELECTED( DALI_IMAGE_DIR "icon-stop-selected.png" ); | ||
| 49 | 54 | ||
| 50 | const char* IMAGES[] = | 55 | const char* IMAGES[] = |
| 51 | { | 56 | { |
| @@ -197,14 +202,19 @@ private: | @@ -197,14 +202,19 @@ private: | ||
| 197 | Timer mViewTimer; | 202 | Timer mViewTimer; |
| 198 | Toolkit::PushButton mSlideshowButton; | 203 | Toolkit::PushButton mSlideshowButton; |
| 199 | Image mIconSlideshowStart; | 204 | Image mIconSlideshowStart; |
| 205 | + Image mIconSlideshowStartSelected; | ||
| 200 | Image mIconSlideshowStop; | 206 | Image mIconSlideshowStop; |
| 207 | + Image mIconSlideshowStopSelected; | ||
| 201 | 208 | ||
| 202 | Vector2 mPanPosition; | 209 | Vector2 mPanPosition; |
| 203 | Vector2 mPanDisplacement; | 210 | Vector2 mPanDisplacement; |
| 204 | 211 | ||
| 205 | Image mImageWave; | 212 | Image mImageWave; |
| 213 | + Image mImageWaveSelected; | ||
| 206 | Image mImageCross; | 214 | Image mImageCross; |
| 215 | + Image mImageCrossSelected; | ||
| 207 | Image mImageFold; | 216 | Image mImageFold; |
| 217 | + Image mImageFoldSelected; | ||
| 208 | Toolkit::PushButton mEffectChangeButton; | 218 | Toolkit::PushButton mEffectChangeButton; |
| 209 | }; | 219 | }; |
| 210 | 220 | ||
| @@ -231,10 +241,14 @@ void CubeTransitionApp::OnInit( Application& application ) | @@ -231,10 +241,14 @@ void CubeTransitionApp::OnInit( Application& application ) | ||
| 231 | 241 | ||
| 232 | // Add an effect-changing button on the right of the tool bar. | 242 | // Add an effect-changing button on the right of the tool bar. |
| 233 | mImageWave = ResourceImage::New( EFFECT_WAVE_IMAGE ); | 243 | mImageWave = ResourceImage::New( EFFECT_WAVE_IMAGE ); |
| 244 | + mImageWaveSelected = ResourceImage::New( EFFECT_WAVE_IMAGE_SELECTED ); | ||
| 234 | mImageCross = ResourceImage::New( EFFECT_CROSS_IMAGE ); | 245 | mImageCross = ResourceImage::New( EFFECT_CROSS_IMAGE ); |
| 246 | + mImageCrossSelected = ResourceImage::New( EFFECT_CROSS_IMAGE_SELECTED ); | ||
| 235 | mImageFold = ResourceImage::New( EFFECT_FOLD_IMAGE ); | 247 | mImageFold = ResourceImage::New( EFFECT_FOLD_IMAGE ); |
| 248 | + mImageFoldSelected = ResourceImage::New( EFFECT_FOLD_IMAGE_SELECTED ); | ||
| 236 | mEffectChangeButton = Toolkit::PushButton::New(); | 249 | mEffectChangeButton = Toolkit::PushButton::New(); |
| 237 | - mEffectChangeButton.SetBackgroundImage(mImageWave); | 250 | + mEffectChangeButton.SetButtonImage( mImageWave ); |
| 251 | + mEffectChangeButton.SetSelectedImage( mImageWaveSelected ); | ||
| 238 | mEffectChangeButton.ClickedSignal().Connect( this, &CubeTransitionApp::OnEffectButtonClicked ); | 252 | mEffectChangeButton.ClickedSignal().Connect( this, &CubeTransitionApp::OnEffectButtonClicked ); |
| 239 | mToolBar.AddControl( mEffectChangeButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); | 253 | mToolBar.AddControl( mEffectChangeButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); |
| 240 | 254 | ||
| @@ -244,9 +258,12 @@ void CubeTransitionApp::OnInit( Application& application ) | @@ -244,9 +258,12 @@ void CubeTransitionApp::OnInit( Application& application ) | ||
| 244 | 258 | ||
| 245 | //Add an slideshow icon on the right of the title | 259 | //Add an slideshow icon on the right of the title |
| 246 | mIconSlideshowStart = ResourceImage::New( SLIDE_SHOW_START_ICON ); | 260 | mIconSlideshowStart = ResourceImage::New( SLIDE_SHOW_START_ICON ); |
| 261 | + mIconSlideshowStartSelected = ResourceImage::New( SLIDE_SHOW_START_ICON_SELECTED ); | ||
| 247 | mIconSlideshowStop = ResourceImage::New( SLIDE_SHOW_STOP_ICON ); | 262 | mIconSlideshowStop = ResourceImage::New( SLIDE_SHOW_STOP_ICON ); |
| 263 | + mIconSlideshowStopSelected = ResourceImage::New( SLIDE_SHOW_STOP_ICON_SELECTED ); | ||
| 248 | mSlideshowButton = Toolkit::PushButton::New(); | 264 | mSlideshowButton = Toolkit::PushButton::New(); |
| 249 | - mSlideshowButton.SetBackgroundImage( mIconSlideshowStart ); | 265 | + mSlideshowButton.SetButtonImage( mIconSlideshowStart ); |
| 266 | + mSlideshowButton.SetSelectedImage( mIconSlideshowStartSelected ); | ||
| 250 | mSlideshowButton.ClickedSignal().Connect( this, &CubeTransitionApp::OnSildeshowButtonClicked ); | 267 | mSlideshowButton.ClickedSignal().Connect( this, &CubeTransitionApp::OnSildeshowButtonClicked ); |
| 251 | mToolBar.AddControl( mSlideshowButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalCenter, DemoHelper::DEFAULT_PLAY_PADDING ); | 268 | mToolBar.AddControl( mSlideshowButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalCenter, DemoHelper::DEFAULT_PLAY_PADDING ); |
| 252 | 269 | ||
| @@ -357,20 +374,23 @@ bool CubeTransitionApp::OnEffectButtonClicked( Toolkit::Button button ) | @@ -357,20 +374,23 @@ bool CubeTransitionApp::OnEffectButtonClicked( Toolkit::Button button ) | ||
| 357 | { | 374 | { |
| 358 | mCurrentEffect = mCubeCrossEffect; | 375 | mCurrentEffect = mCubeCrossEffect; |
| 359 | mTitleActor.SetProperty( TextLabel::Property::TEXT, std::string(APPLICATION_TITLE_CROSS) ); | 376 | mTitleActor.SetProperty( TextLabel::Property::TEXT, std::string(APPLICATION_TITLE_CROSS) ); |
| 360 | - mEffectChangeButton.SetBackgroundImage(mImageCross); | 377 | + mEffectChangeButton.SetButtonImage( mImageCross ); |
| 378 | + mEffectChangeButton.SetSelectedImage( mImageCrossSelected ); | ||
| 361 | 379 | ||
| 362 | } | 380 | } |
| 363 | else if(mCurrentEffect == mCubeCrossEffect) | 381 | else if(mCurrentEffect == mCubeCrossEffect) |
| 364 | { | 382 | { |
| 365 | mCurrentEffect = mCubeFoldEffect; | 383 | mCurrentEffect = mCubeFoldEffect; |
| 366 | mTitleActor.SetProperty( TextLabel::Property::TEXT, std::string(APPLICATION_TITLE_FOLD) ); | 384 | mTitleActor.SetProperty( TextLabel::Property::TEXT, std::string(APPLICATION_TITLE_FOLD) ); |
| 367 | - mEffectChangeButton.SetBackgroundImage(mImageFold); | 385 | + mEffectChangeButton.SetButtonImage( mImageFold ); |
| 386 | + mEffectChangeButton.SetSelectedImage( mImageFoldSelected ); | ||
| 368 | } | 387 | } |
| 369 | else | 388 | else |
| 370 | { | 389 | { |
| 371 | mCurrentEffect = mCubeWaveEffect; | 390 | mCurrentEffect = mCubeWaveEffect; |
| 372 | mTitleActor.SetProperty( TextLabel::Property::TEXT, std::string(APPLICATION_TITLE_WAVE) ); | 391 | mTitleActor.SetProperty( TextLabel::Property::TEXT, std::string(APPLICATION_TITLE_WAVE) ); |
| 373 | - mEffectChangeButton.SetBackgroundImage(mImageWave); | 392 | + mEffectChangeButton.SetButtonImage( mImageWave ); |
| 393 | + mEffectChangeButton.SetSelectedImage( mImageWaveSelected ); | ||
| 374 | } | 394 | } |
| 375 | 395 | ||
| 376 | // Set the current image to cube transition effect | 396 | // Set the current image to cube transition effect |
| @@ -385,7 +405,8 @@ bool CubeTransitionApp::OnSildeshowButtonClicked( Toolkit::Button button ) | @@ -385,7 +405,8 @@ bool CubeTransitionApp::OnSildeshowButtonClicked( Toolkit::Button button ) | ||
| 385 | if( mSlideshow ) | 405 | if( mSlideshow ) |
| 386 | { | 406 | { |
| 387 | mPanGestureDetector.Detach( mParent ); | 407 | mPanGestureDetector.Detach( mParent ); |
| 388 | - mSlideshowButton.SetBackgroundImage( mIconSlideshowStop ); | 408 | + mSlideshowButton.SetButtonImage( mIconSlideshowStop ); |
| 409 | + mSlideshowButton.SetSelectedImage( mIconSlideshowStopSelected ); | ||
| 389 | mPanPosition = Vector2( mViewSize.width, mViewSize.height*0.5f ); | 410 | mPanPosition = Vector2( mViewSize.width, mViewSize.height*0.5f ); |
| 390 | mPanDisplacement = Vector2( -10.f, 0.f ); | 411 | mPanDisplacement = Vector2( -10.f, 0.f ); |
| 391 | mViewTimer.Start(); | 412 | mViewTimer.Start(); |
| @@ -393,7 +414,8 @@ bool CubeTransitionApp::OnSildeshowButtonClicked( Toolkit::Button button ) | @@ -393,7 +414,8 @@ bool CubeTransitionApp::OnSildeshowButtonClicked( Toolkit::Button button ) | ||
| 393 | else | 414 | else |
| 394 | { | 415 | { |
| 395 | mPanGestureDetector.Attach( mParent ); | 416 | mPanGestureDetector.Attach( mParent ); |
| 396 | - mSlideshowButton.SetBackgroundImage( mIconSlideshowStart ); | 417 | + mSlideshowButton.SetButtonImage( mIconSlideshowStart ); |
| 418 | + mSlideshowButton.SetSelectedImage( mIconSlideshowStartSelected ); | ||
| 397 | mViewTimer.Stop(); | 419 | mViewTimer.Stop(); |
| 398 | } | 420 | } |
| 399 | return true; | 421 | return true; |
examples/dissolve-effect/dissolve-effect-example.cpp
| @@ -37,9 +37,13 @@ const char * const TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" ); | @@ -37,9 +37,13 @@ const char * const TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" ); | ||
| 37 | const char * const APPLICATION_TITLE_HIGHP( "Dissolve Effect(highp)" ); | 37 | const char * const APPLICATION_TITLE_HIGHP( "Dissolve Effect(highp)" ); |
| 38 | const char * const APPLICATION_TITLE_MEDIUMP( "Dissolve Effect(mediump)" ); | 38 | const char * const APPLICATION_TITLE_MEDIUMP( "Dissolve Effect(mediump)" ); |
| 39 | const char * const EFFECT_HIGHP_IMAGE( DALI_IMAGE_DIR "icon-highp.png" ); | 39 | const char * const EFFECT_HIGHP_IMAGE( DALI_IMAGE_DIR "icon-highp.png" ); |
| 40 | +const char * const EFFECT_HIGHP_IMAGE_SELECTED( DALI_IMAGE_DIR "icon-highp-selected.png" ); | ||
| 40 | const char * const EFFECT_MEDIUMP_IMAGE( DALI_IMAGE_DIR "icon-mediump.png" ); | 41 | const char * const EFFECT_MEDIUMP_IMAGE( DALI_IMAGE_DIR "icon-mediump.png" ); |
| 42 | +const char * const EFFECT_MEDIUMP_IMAGE_SELECTED( DALI_IMAGE_DIR "icon-mediump-selected.png" ); | ||
| 41 | const char * const PLAY_ICON( DALI_IMAGE_DIR "icon-play.png" ); | 43 | const char * const PLAY_ICON( DALI_IMAGE_DIR "icon-play.png" ); |
| 44 | +const char * const PLAY_ICON_SELECTED( DALI_IMAGE_DIR "icon-play-selected.png" ); | ||
| 42 | const char * const STOP_ICON( DALI_IMAGE_DIR "icon-stop.png" ); | 45 | const char * const STOP_ICON( DALI_IMAGE_DIR "icon-stop.png" ); |
| 46 | +const char * const STOP_ICON_SELECTED( DALI_IMAGE_DIR "icon-stop-selected.png" ); | ||
| 43 | 47 | ||
| 44 | const char* IMAGES[] = | 48 | const char* IMAGES[] = |
| 45 | { | 49 | { |
| @@ -177,11 +181,15 @@ private: | @@ -177,11 +181,15 @@ private: | ||
| 177 | unsigned int mCentralLineIndex; | 181 | unsigned int mCentralLineIndex; |
| 178 | 182 | ||
| 179 | Image mIconPlay; | 183 | Image mIconPlay; |
| 184 | + Image mIconPlaySelected; | ||
| 180 | Image mIconStop; | 185 | Image mIconStop; |
| 186 | + Image mIconStopSelected; | ||
| 181 | Toolkit::PushButton mPlayStopButton; | 187 | Toolkit::PushButton mPlayStopButton; |
| 182 | 188 | ||
| 183 | Image mIconHighP; | 189 | Image mIconHighP; |
| 190 | + Image mIconHighPSelected; | ||
| 184 | Image mIconMediumP; | 191 | Image mIconMediumP; |
| 192 | + Image mIconMediumPSelected; | ||
| 185 | Toolkit::PushButton mEffectChangeButton; | 193 | Toolkit::PushButton mEffectChangeButton; |
| 186 | }; | 194 | }; |
| 187 | 195 | ||
| @@ -211,9 +219,12 @@ void DissolveEffectApp::OnInit( Application& application ) | @@ -211,9 +219,12 @@ void DissolveEffectApp::OnInit( Application& application ) | ||
| 211 | 219 | ||
| 212 | // Add an effect-changing button on the right of the tool bar. | 220 | // Add an effect-changing button on the right of the tool bar. |
| 213 | mIconHighP = ResourceImage::New( EFFECT_HIGHP_IMAGE ); | 221 | mIconHighP = ResourceImage::New( EFFECT_HIGHP_IMAGE ); |
| 222 | + mIconHighPSelected = ResourceImage::New( EFFECT_HIGHP_IMAGE_SELECTED ); | ||
| 214 | mIconMediumP = ResourceImage::New( EFFECT_MEDIUMP_IMAGE ); | 223 | mIconMediumP = ResourceImage::New( EFFECT_MEDIUMP_IMAGE ); |
| 224 | + mIconMediumPSelected = ResourceImage::New( EFFECT_MEDIUMP_IMAGE_SELECTED ); | ||
| 215 | mEffectChangeButton = Toolkit::PushButton::New(); | 225 | mEffectChangeButton = Toolkit::PushButton::New(); |
| 216 | - mEffectChangeButton.SetBackgroundImage(mIconHighP); | 226 | + mEffectChangeButton.SetButtonImage( mIconHighP ); |
| 227 | + mEffectChangeButton.SetSelectedImage( mIconHighPSelected ); | ||
| 217 | mEffectChangeButton.ClickedSignal().Connect( this, &DissolveEffectApp::OnEffectButtonClicked ); | 228 | mEffectChangeButton.ClickedSignal().Connect( this, &DissolveEffectApp::OnEffectButtonClicked ); |
| 218 | mToolBar.AddControl( mEffectChangeButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); | 229 | mToolBar.AddControl( mEffectChangeButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); |
| 219 | 230 | ||
| @@ -223,9 +234,12 @@ void DissolveEffectApp::OnInit( Application& application ) | @@ -223,9 +234,12 @@ void DissolveEffectApp::OnInit( Application& application ) | ||
| 223 | 234 | ||
| 224 | // Add an slide-show button on the right of the title | 235 | // Add an slide-show button on the right of the title |
| 225 | mIconPlay = ResourceImage::New( PLAY_ICON ); | 236 | mIconPlay = ResourceImage::New( PLAY_ICON ); |
| 237 | + mIconPlaySelected = ResourceImage::New( PLAY_ICON_SELECTED ); | ||
| 226 | mIconStop = ResourceImage::New( STOP_ICON ); | 238 | mIconStop = ResourceImage::New( STOP_ICON ); |
| 239 | + mIconStopSelected = ResourceImage::New( STOP_ICON_SELECTED ); | ||
| 227 | mPlayStopButton = Toolkit::PushButton::New(); | 240 | mPlayStopButton = Toolkit::PushButton::New(); |
| 228 | - mPlayStopButton.SetBackgroundImage( mIconPlay ); | 241 | + mPlayStopButton.SetButtonImage( mIconPlay ); |
| 242 | + mPlayStopButton.SetSelectedImage( mIconPlaySelected ); | ||
| 229 | mPlayStopButton.ClickedSignal().Connect( this, &DissolveEffectApp::OnSildeshowButtonClicked ); | 243 | mPlayStopButton.ClickedSignal().Connect( this, &DissolveEffectApp::OnSildeshowButtonClicked ); |
| 230 | mToolBar.AddControl( mPlayStopButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalCenter, DemoHelper::DEFAULT_PLAY_PADDING ); | 244 | mToolBar.AddControl( mPlayStopButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalCenter, DemoHelper::DEFAULT_PLAY_PADDING ); |
| 231 | 245 | ||
| @@ -336,12 +350,14 @@ bool DissolveEffectApp::OnEffectButtonClicked( Toolkit::Button button ) | @@ -336,12 +350,14 @@ bool DissolveEffectApp::OnEffectButtonClicked( Toolkit::Button button ) | ||
| 336 | if(mUseHighPrecision) | 350 | if(mUseHighPrecision) |
| 337 | { | 351 | { |
| 338 | mTitleActor.SetProperty( TextLabel::Property::TEXT, std::string(APPLICATION_TITLE_HIGHP) ); | 352 | mTitleActor.SetProperty( TextLabel::Property::TEXT, std::string(APPLICATION_TITLE_HIGHP) ); |
| 339 | - mEffectChangeButton.SetBackgroundImage(mIconHighP); | 353 | + mEffectChangeButton.SetButtonImage( mIconHighP ); |
| 354 | + mEffectChangeButton.SetSelectedImage( mIconHighPSelected ); | ||
| 340 | } | 355 | } |
| 341 | else | 356 | else |
| 342 | { | 357 | { |
| 343 | mTitleActor.SetProperty( TextLabel::Property::TEXT, std::string(APPLICATION_TITLE_MEDIUMP) ); | 358 | mTitleActor.SetProperty( TextLabel::Property::TEXT, std::string(APPLICATION_TITLE_MEDIUMP) ); |
| 344 | - mEffectChangeButton.SetBackgroundImage(mIconMediumP); | 359 | + mEffectChangeButton.SetButtonImage( mIconMediumP ); |
| 360 | + mEffectChangeButton.SetSelectedImage( mIconMediumPSelected ); | ||
| 345 | } | 361 | } |
| 346 | 362 | ||
| 347 | return true; | 363 | return true; |
| @@ -352,14 +368,16 @@ bool DissolveEffectApp::OnSildeshowButtonClicked( Toolkit::Button button ) | @@ -352,14 +368,16 @@ bool DissolveEffectApp::OnSildeshowButtonClicked( Toolkit::Button button ) | ||
| 352 | mSlideshow = !mSlideshow; | 368 | mSlideshow = !mSlideshow; |
| 353 | if( mSlideshow ) | 369 | if( mSlideshow ) |
| 354 | { | 370 | { |
| 355 | - mPlayStopButton.SetBackgroundImage( mIconStop ); | 371 | + mPlayStopButton.SetButtonImage( mIconStop ); |
| 372 | + mPlayStopButton.SetSelectedImage( mIconStopSelected ); | ||
| 356 | mPanGestureDetector.Detach( mParent ); | 373 | mPanGestureDetector.Detach( mParent ); |
| 357 | mViewTimer.Start(); | 374 | mViewTimer.Start(); |
| 358 | mTimerReady = false; | 375 | mTimerReady = false; |
| 359 | } | 376 | } |
| 360 | else | 377 | else |
| 361 | { | 378 | { |
| 362 | - mPlayStopButton.SetBackgroundImage( mIconPlay ); | 379 | + mPlayStopButton.SetButtonImage( mIconPlay ); |
| 380 | + mPlayStopButton.SetSelectedImage( mIconPlaySelected ); | ||
| 363 | mTimerReady = true; | 381 | mTimerReady = true; |
| 364 | mPanGestureDetector.Attach( mParent ); | 382 | mPanGestureDetector.Attach( mParent ); |
| 365 | } | 383 | } |
examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp
| @@ -36,10 +36,6 @@ const char* const NEXT_BUTTON_ID = "NEXT_BUTTON"; | @@ -36,10 +36,6 @@ const char* const NEXT_BUTTON_ID = "NEXT_BUTTON"; | ||
| 36 | const char* const PREVIOUS_BUTTON_ID = "PREVIOUS_BUTTON"; | 36 | const char* const PREVIOUS_BUTTON_ID = "PREVIOUS_BUTTON"; |
| 37 | const char * const DALI_ICON_PLAY = DALI_IMAGE_DIR "icon-play.png"; | 37 | const char * const DALI_ICON_PLAY = DALI_IMAGE_DIR "icon-play.png"; |
| 38 | 38 | ||
| 39 | -const char* const PUSHBUTTON_PRESS_IMAGE = DALI_IMAGE_DIR "button-down.9.png"; | ||
| 40 | -const char* const PUSHBUTTON_BUTTON_IMAGE = DALI_IMAGE_DIR "button-up.9.png"; | ||
| 41 | -const char* const PUSHBUTTON_DISABLED_IMAGE = DALI_IMAGE_DIR "button-disabled.9.png"; | ||
| 42 | - | ||
| 43 | const char* const FITTING_BUTTON_ID = "FITTING_BUTTON"; | 39 | const char* const FITTING_BUTTON_ID = "FITTING_BUTTON"; |
| 44 | const char* const SAMPLING_BUTTON_ID = "SAMPLING_BUTTON"; | 40 | const char* const SAMPLING_BUTTON_ID = "SAMPLING_BUTTON"; |
| 45 | const char* const FITTING_BUTTON_TEXT = "Fitting"; | 41 | const char* const FITTING_BUTTON_TEXT = "Fitting"; |
| @@ -229,9 +225,6 @@ public: | @@ -229,9 +225,6 @@ public: | ||
| 229 | mGrabCorner = Toolkit::PushButton::New(); | 225 | mGrabCorner = Toolkit::PushButton::New(); |
| 230 | mGrabCorner.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::WIDTH ); | 226 | mGrabCorner.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::WIDTH ); |
| 231 | mGrabCorner.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT ); | 227 | mGrabCorner.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT ); |
| 232 | - mGrabCorner.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); | ||
| 233 | - mGrabCorner.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); | ||
| 234 | - mGrabCorner.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) ); | ||
| 235 | mGrabCorner.SetName( "GrabCorner" ); | 228 | mGrabCorner.SetName( "GrabCorner" ); |
| 236 | mGrabCorner.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT ); | 229 | mGrabCorner.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT ); |
| 237 | mGrabCorner.SetParentOrigin( ParentOrigin::BOTTOM_RIGHT ); | 230 | mGrabCorner.SetParentOrigin( ParentOrigin::BOTTOM_RIGHT ); |
| @@ -382,9 +375,6 @@ public: | @@ -382,9 +375,6 @@ public: | ||
| 382 | button.SetLabel( label ); | 375 | button.SetLabel( label ); |
| 383 | button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); | 376 | button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); |
| 384 | button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT ); | 377 | button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT ); |
| 385 | - button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); | ||
| 386 | - button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); | ||
| 387 | - button.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) ); | ||
| 388 | button.ClickedSignal().Connect( this, &ImageScalingAndFilteringController::OnButtonClicked ); | 378 | button.ClickedSignal().Connect( this, &ImageScalingAndFilteringController::OnButtonClicked ); |
| 389 | return button; | 379 | return button; |
| 390 | } | 380 | } |
| @@ -412,8 +402,6 @@ public: | @@ -412,8 +402,6 @@ public: | ||
| 412 | Toolkit::PushButton button = Toolkit::PushButton::New(); | 402 | Toolkit::PushButton button = Toolkit::PushButton::New(); |
| 413 | button.SetName( id ); | 403 | button.SetName( id ); |
| 414 | button.SetLabel( id ); | 404 | button.SetLabel( id ); |
| 415 | - button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); | ||
| 416 | - button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); | ||
| 417 | Toolkit::TextLabel textLabel = Toolkit::TextLabel::DownCast( button.GetLabel() ); | 405 | Toolkit::TextLabel textLabel = Toolkit::TextLabel::DownCast( button.GetLabel() ); |
| 418 | textLabel.SetProperty( TextLabel::Property::POINT_SIZE, 12.0f ); | 406 | textLabel.SetProperty( TextLabel::Property::POINT_SIZE, 12.0f ); |
| 419 | 407 |
examples/image-scaling-irregular-grid/image-scaling-irregular-grid-example.cpp
| @@ -65,6 +65,7 @@ const char* BACKGROUND_IMAGE( DALI_IMAGE_DIR "background-gradient.jpg" ); | @@ -65,6 +65,7 @@ const char* BACKGROUND_IMAGE( DALI_IMAGE_DIR "background-gradient.jpg" ); | ||
| 65 | const char* TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" ); | 65 | const char* TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" ); |
| 66 | const char* APPLICATION_TITLE( "Image Scaling Modes" ); | 66 | const char* APPLICATION_TITLE( "Image Scaling Modes" ); |
| 67 | const char* TOGGLE_SCALING_IMAGE( DALI_IMAGE_DIR "icon-change.png" ); | 67 | const char* TOGGLE_SCALING_IMAGE( DALI_IMAGE_DIR "icon-change.png" ); |
| 68 | +const char* TOGGLE_SCALING_IMAGE_SELECTED( DALI_IMAGE_DIR "icon-change-selected.png" ); | ||
| 68 | 69 | ||
| 69 | /** The width of the grid in whole grid cells. */ | 70 | /** The width of the grid in whole grid cells. */ |
| 70 | const unsigned GRID_WIDTH = 9; | 71 | const unsigned GRID_WIDTH = 9; |
| @@ -306,8 +307,10 @@ public: | @@ -306,8 +307,10 @@ public: | ||
| 306 | 307 | ||
| 307 | // Create an image scaling toggle button. (right of toolbar) | 308 | // Create an image scaling toggle button. (right of toolbar) |
| 308 | Image toggleScalingImage = ResourceImage::New( TOGGLE_SCALING_IMAGE ); | 309 | Image toggleScalingImage = ResourceImage::New( TOGGLE_SCALING_IMAGE ); |
| 310 | + Image toggleScalingImageSelected = ResourceImage::New( TOGGLE_SCALING_IMAGE_SELECTED ); | ||
| 309 | Toolkit::PushButton toggleScalingButton = Toolkit::PushButton::New(); | 311 | Toolkit::PushButton toggleScalingButton = Toolkit::PushButton::New(); |
| 310 | - toggleScalingButton.SetBackgroundImage( toggleScalingImage ); | 312 | + toggleScalingButton.SetButtonImage( toggleScalingImage ); |
| 313 | + toggleScalingButton.SetSelectedImage( toggleScalingImageSelected ); | ||
| 311 | toggleScalingButton.ClickedSignal().Connect( this, &ImageScalingIrregularGridController::OnToggleScalingTouched ); | 314 | toggleScalingButton.ClickedSignal().Connect( this, &ImageScalingIrregularGridController::OnToggleScalingTouched ); |
| 312 | mToolBar.AddControl( toggleScalingButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); | 315 | mToolBar.AddControl( toggleScalingButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); |
| 313 | 316 |
examples/item-view/item-view-example.cpp
| @@ -107,12 +107,19 @@ const unsigned int NUM_IMAGE_PER_ROW_IN_ATLAS = 8; | @@ -107,12 +107,19 @@ const unsigned int NUM_IMAGE_PER_ROW_IN_ATLAS = 8; | ||
| 107 | const char* BACKGROUND_IMAGE( "" ); | 107 | const char* BACKGROUND_IMAGE( "" ); |
| 108 | const char* TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" ); | 108 | const char* TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" ); |
| 109 | const char* EDIT_IMAGE( DALI_IMAGE_DIR "icon-edit.png" ); | 109 | const char* EDIT_IMAGE( DALI_IMAGE_DIR "icon-edit.png" ); |
| 110 | +const char* EDIT_IMAGE_SELECTED( DALI_IMAGE_DIR "icon-edit-selected.png" ); | ||
| 110 | const char* SPIRAL_LAYOUT_IMAGE( DALI_IMAGE_DIR "icon-item-view-layout-spiral.png" ); | 111 | const char* SPIRAL_LAYOUT_IMAGE( DALI_IMAGE_DIR "icon-item-view-layout-spiral.png" ); |
| 112 | +const char* SPIRAL_LAYOUT_IMAGE_SELECTED( DALI_IMAGE_DIR "icon-item-view-layout-spiral-selected.png" ); | ||
| 111 | const char* GRID_LAYOUT_IMAGE( DALI_IMAGE_DIR "icon-item-view-layout-grid.png" ); | 113 | const char* GRID_LAYOUT_IMAGE( DALI_IMAGE_DIR "icon-item-view-layout-grid.png" ); |
| 114 | +const char* GRID_LAYOUT_IMAGE_SELECTED( DALI_IMAGE_DIR "icon-item-view-layout-grid-selected.png" ); | ||
| 112 | const char* DEPTH_LAYOUT_IMAGE( DALI_IMAGE_DIR "icon-item-view-layout-depth.png" ); | 115 | const char* DEPTH_LAYOUT_IMAGE( DALI_IMAGE_DIR "icon-item-view-layout-depth.png" ); |
| 116 | +const char* DEPTH_LAYOUT_IMAGE_SELECTED( DALI_IMAGE_DIR "icon-item-view-layout-depth-selected.png" ); | ||
| 113 | const char* DELETE_IMAGE( DALI_IMAGE_DIR "icon-delete.png" ); | 117 | const char* DELETE_IMAGE( DALI_IMAGE_DIR "icon-delete.png" ); |
| 118 | +const char* DELETE_IMAGE_SELECTED( DALI_IMAGE_DIR "icon-delete-selected.png" ); | ||
| 114 | const char* REPLACE_IMAGE( DALI_IMAGE_DIR "icon-replace.png" ); | 119 | const char* REPLACE_IMAGE( DALI_IMAGE_DIR "icon-replace.png" ); |
| 120 | +const char* REPLACE_IMAGE_SELECTED( DALI_IMAGE_DIR "icon-replace-selected.png" ); | ||
| 115 | const char* INSERT_IMAGE( DALI_IMAGE_DIR "icon-insert.png" ); | 121 | const char* INSERT_IMAGE( DALI_IMAGE_DIR "icon-insert.png" ); |
| 122 | +const char* INSERT_IMAGE_SELECTED( DALI_IMAGE_DIR "icon-insert-selected.png" ); | ||
| 116 | const char* SELECTED_IMAGE( DALI_IMAGE_DIR "item-select-check.png" ); | 123 | const char* SELECTED_IMAGE( DALI_IMAGE_DIR "item-select-check.png" ); |
| 117 | const char* APPLICATION_TITLE( "ItemView" ); | 124 | const char* APPLICATION_TITLE( "ItemView" ); |
| 118 | 125 | ||
| @@ -224,14 +231,16 @@ public: | @@ -224,14 +231,16 @@ public: | ||
| 224 | 231 | ||
| 225 | // Create an edit mode button. (left of toolbar) | 232 | // Create an edit mode button. (left of toolbar) |
| 226 | Toolkit::PushButton editButton = Toolkit::PushButton::New(); | 233 | Toolkit::PushButton editButton = Toolkit::PushButton::New(); |
| 227 | - editButton.SetBackgroundImage( ResourceImage::New( EDIT_IMAGE ) ); | 234 | + editButton.SetButtonImage( ResourceImage::New( EDIT_IMAGE ) ); |
| 235 | + editButton.SetSelectedImage( ResourceImage::New( EDIT_IMAGE_SELECTED ) ); | ||
| 228 | editButton.ClickedSignal().Connect( this, &ItemViewExample::OnModeButtonClicked); | 236 | editButton.ClickedSignal().Connect( this, &ItemViewExample::OnModeButtonClicked); |
| 229 | editButton.SetLeaveRequired( true ); | 237 | editButton.SetLeaveRequired( true ); |
| 230 | mToolBar.AddControl( editButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalLeft, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); | 238 | mToolBar.AddControl( editButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalLeft, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); |
| 231 | 239 | ||
| 232 | // Create a layout toggle button. (right of toolbar) | 240 | // Create a layout toggle button. (right of toolbar) |
| 233 | mLayoutButton = Toolkit::PushButton::New(); | 241 | mLayoutButton = Toolkit::PushButton::New(); |
| 234 | - mLayoutButton.SetBackgroundImage( ResourceImage::New( SPIRAL_LAYOUT_IMAGE ) ); | 242 | + mLayoutButton.SetButtonImage( ResourceImage::New( SPIRAL_LAYOUT_IMAGE ) ); |
| 243 | + mLayoutButton.SetSelectedImage( ResourceImage::New( SPIRAL_LAYOUT_IMAGE_SELECTED ) ); | ||
| 235 | mLayoutButton.ClickedSignal().Connect( this, &ItemViewExample::OnLayoutButtonClicked); | 244 | mLayoutButton.ClickedSignal().Connect( this, &ItemViewExample::OnLayoutButtonClicked); |
| 236 | mLayoutButton.SetLeaveRequired( true ); | 245 | mLayoutButton.SetLeaveRequired( true ); |
| 237 | mToolBar.AddControl( mLayoutButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); | 246 | mToolBar.AddControl( mLayoutButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); |
| @@ -243,6 +252,7 @@ public: | @@ -243,6 +252,7 @@ public: | ||
| 243 | mDeleteButton.SetPosition( BUTTON_BORDER, BUTTON_BORDER ); | 252 | mDeleteButton.SetPosition( BUTTON_BORDER, BUTTON_BORDER ); |
| 244 | mDeleteButton.SetDrawMode( DrawMode::OVERLAY ); | 253 | mDeleteButton.SetDrawMode( DrawMode::OVERLAY ); |
| 245 | mDeleteButton.SetButtonImage( ResourceImage::New( DELETE_IMAGE ) ); | 254 | mDeleteButton.SetButtonImage( ResourceImage::New( DELETE_IMAGE ) ); |
| 255 | + mDeleteButton.SetSelectedImage( ResourceImage::New( DELETE_IMAGE_SELECTED ) ); | ||
| 246 | mDeleteButton.SetBackgroundImage( ResourceImage::New( TOOLBAR_IMAGE ) ); | 256 | mDeleteButton.SetBackgroundImage( ResourceImage::New( TOOLBAR_IMAGE ) ); |
| 247 | mDeleteButton.SetSize( Vector2( stageSize.width * 0.15f, stageSize.width * 0.15f ) ); | 257 | mDeleteButton.SetSize( Vector2( stageSize.width * 0.15f, stageSize.width * 0.15f ) ); |
| 248 | mDeleteButton.ClickedSignal().Connect( this, &ItemViewExample::OnDeleteButtonClicked); | 258 | mDeleteButton.ClickedSignal().Connect( this, &ItemViewExample::OnDeleteButtonClicked); |
| @@ -257,6 +267,7 @@ public: | @@ -257,6 +267,7 @@ public: | ||
| 257 | mInsertButton.SetPosition( BUTTON_BORDER, BUTTON_BORDER ); | 267 | mInsertButton.SetPosition( BUTTON_BORDER, BUTTON_BORDER ); |
| 258 | mInsertButton.SetDrawMode( DrawMode::OVERLAY ); | 268 | mInsertButton.SetDrawMode( DrawMode::OVERLAY ); |
| 259 | mInsertButton.SetButtonImage( ResourceImage::New( INSERT_IMAGE ) ); | 269 | mInsertButton.SetButtonImage( ResourceImage::New( INSERT_IMAGE ) ); |
| 270 | + mInsertButton.SetSelectedImage( ResourceImage::New( INSERT_IMAGE_SELECTED ) ); | ||
| 260 | mInsertButton.SetBackgroundImage( ResourceImage::New( TOOLBAR_IMAGE ) ); | 271 | mInsertButton.SetBackgroundImage( ResourceImage::New( TOOLBAR_IMAGE ) ); |
| 261 | mInsertButton.SetSize( stageSize.width * 0.15f, stageSize.width * 0.15f ); | 272 | mInsertButton.SetSize( stageSize.width * 0.15f, stageSize.width * 0.15f ); |
| 262 | mInsertButton.ClickedSignal().Connect( this, &ItemViewExample::OnInsertButtonClicked); | 273 | mInsertButton.ClickedSignal().Connect( this, &ItemViewExample::OnInsertButtonClicked); |
| @@ -271,6 +282,7 @@ public: | @@ -271,6 +282,7 @@ public: | ||
| 271 | mReplaceButton.SetPosition( BUTTON_BORDER, BUTTON_BORDER ); | 282 | mReplaceButton.SetPosition( BUTTON_BORDER, BUTTON_BORDER ); |
| 272 | mReplaceButton.SetDrawMode( DrawMode::OVERLAY ); | 283 | mReplaceButton.SetDrawMode( DrawMode::OVERLAY ); |
| 273 | mReplaceButton.SetButtonImage( ResourceImage::New( REPLACE_IMAGE ) ); | 284 | mReplaceButton.SetButtonImage( ResourceImage::New( REPLACE_IMAGE ) ); |
| 285 | + mReplaceButton.SetSelectedImage( ResourceImage::New( REPLACE_IMAGE_SELECTED ) ); | ||
| 274 | mReplaceButton.SetBackgroundImage( ResourceImage::New( TOOLBAR_IMAGE ) ); | 286 | mReplaceButton.SetBackgroundImage( ResourceImage::New( TOOLBAR_IMAGE ) ); |
| 275 | mReplaceButton.SetSize( stageSize.width * 0.15f, stageSize.width * 0.15f ); | 287 | mReplaceButton.SetSize( stageSize.width * 0.15f, stageSize.width * 0.15f ); |
| 276 | mReplaceButton.ClickedSignal().Connect( this, &ItemViewExample::OnReplaceButtonClicked); | 288 | mReplaceButton.ClickedSignal().Connect( this, &ItemViewExample::OnReplaceButtonClicked); |
| @@ -799,19 +811,22 @@ public: | @@ -799,19 +811,22 @@ public: | ||
| 799 | { | 811 | { |
| 800 | case SPIRAL_LAYOUT: | 812 | case SPIRAL_LAYOUT: |
| 801 | { | 813 | { |
| 802 | - mLayoutButton.SetBackgroundImage( ResourceImage::New( SPIRAL_LAYOUT_IMAGE ) ); | 814 | + mLayoutButton.SetButtonImage( ResourceImage::New( SPIRAL_LAYOUT_IMAGE ) ); |
| 815 | + mLayoutButton.SetSelectedImage( ResourceImage::New( SPIRAL_LAYOUT_IMAGE_SELECTED ) ); | ||
| 803 | break; | 816 | break; |
| 804 | } | 817 | } |
| 805 | 818 | ||
| 806 | case GRID_LAYOUT: | 819 | case GRID_LAYOUT: |
| 807 | { | 820 | { |
| 808 | - mLayoutButton.SetBackgroundImage( ResourceImage::New( GRID_LAYOUT_IMAGE ) ); | 821 | + mLayoutButton.SetButtonImage( ResourceImage::New( GRID_LAYOUT_IMAGE ) ); |
| 822 | + mLayoutButton.SetSelectedImage( ResourceImage::New( GRID_LAYOUT_IMAGE_SELECTED ) ); | ||
| 809 | break; | 823 | break; |
| 810 | } | 824 | } |
| 811 | 825 | ||
| 812 | case DEPTH_LAYOUT: | 826 | case DEPTH_LAYOUT: |
| 813 | { | 827 | { |
| 814 | - mLayoutButton.SetBackgroundImage( ResourceImage::New( DEPTH_LAYOUT_IMAGE ) ); | 828 | + mLayoutButton.SetButtonImage( ResourceImage::New( DEPTH_LAYOUT_IMAGE ) ); |
| 829 | + mLayoutButton.SetSelectedImage( ResourceImage::New( DEPTH_LAYOUT_IMAGE_SELECTED ) ); | ||
| 815 | break; | 830 | break; |
| 816 | } | 831 | } |
| 817 | 832 |
examples/logging/logging-example.cpp
| @@ -65,10 +65,6 @@ const int BUTTON_HEIGHT = LOGGER_GROUP_HEIGHT - MARGIN_SIZE * 2; | @@ -65,10 +65,6 @@ const int BUTTON_HEIGHT = LOGGER_GROUP_HEIGHT - MARGIN_SIZE * 2; | ||
| 65 | 65 | ||
| 66 | const Vector4 BACKGROUND_COLOUR( 1.0f, 1.0f, 1.0f, 0.15f ); | 66 | const Vector4 BACKGROUND_COLOUR( 1.0f, 1.0f, 1.0f, 0.15f ); |
| 67 | 67 | ||
| 68 | -const char* const PUSHBUTTON_PRESS_IMAGE = DALI_IMAGE_DIR "button-down.9.png"; | ||
| 69 | -const char* const PUSHBUTTON_BUTTON_IMAGE = DALI_IMAGE_DIR "button-up.9.png"; | ||
| 70 | -const char* const PUSHBUTTON_DISABLED_IMAGE = DALI_IMAGE_DIR "button-disabled.9.png"; | ||
| 71 | - | ||
| 72 | // Button IDs | 68 | // Button IDs |
| 73 | const char* const LOGGER_1_RADIO_ID = "LOGGER_1_RADIO"; | 69 | const char* const LOGGER_1_RADIO_ID = "LOGGER_1_RADIO"; |
| 74 | const char* const LOGGER_2_RADIO_ID = "LOGGER_2_RADIO"; | 70 | const char* const LOGGER_2_RADIO_ID = "LOGGER_2_RADIO"; |
| @@ -292,11 +288,6 @@ class LoggingController: public ConnectionTracker | @@ -292,11 +288,6 @@ class LoggingController: public ConnectionTracker | ||
| 292 | button.SetLabel( CREATE_BUTTON_TEXT ); | 288 | button.SetLabel( CREATE_BUTTON_TEXT ); |
| 293 | button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); | 289 | button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); |
| 294 | button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT ); | 290 | button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT ); |
| 295 | - | ||
| 296 | - button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); | ||
| 297 | - button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); | ||
| 298 | - button.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) ); | ||
| 299 | - | ||
| 300 | button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked ); | 291 | button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked ); |
| 301 | 292 | ||
| 302 | createGroupBackground.Add( button ); | 293 | createGroupBackground.Add( button ); |
| @@ -308,11 +299,6 @@ class LoggingController: public ConnectionTracker | @@ -308,11 +299,6 @@ class LoggingController: public ConnectionTracker | ||
| 308 | button.SetLabel( DELETE_BUTTON_TEXT ); | 299 | button.SetLabel( DELETE_BUTTON_TEXT ); |
| 309 | button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); | 300 | button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); |
| 310 | button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT ); | 301 | button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT ); |
| 311 | - | ||
| 312 | - button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); | ||
| 313 | - button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); | ||
| 314 | - button.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) ); | ||
| 315 | - | ||
| 316 | button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked ); | 302 | button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked ); |
| 317 | 303 | ||
| 318 | createGroupBackground.Add( button ); | 304 | createGroupBackground.Add( button ); |
| @@ -335,11 +321,6 @@ class LoggingController: public ConnectionTracker | @@ -335,11 +321,6 @@ class LoggingController: public ConnectionTracker | ||
| 335 | button.SetLabel( START_BUTTON_TEXT ); | 321 | button.SetLabel( START_BUTTON_TEXT ); |
| 336 | button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); | 322 | button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); |
| 337 | button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT ); | 323 | button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT ); |
| 338 | - | ||
| 339 | - button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); | ||
| 340 | - button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); | ||
| 341 | - button.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) ); | ||
| 342 | - | ||
| 343 | button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked ); | 324 | button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked ); |
| 344 | 325 | ||
| 345 | timingGroupBackground.Add( button ); | 326 | timingGroupBackground.Add( button ); |
| @@ -351,11 +332,6 @@ class LoggingController: public ConnectionTracker | @@ -351,11 +332,6 @@ class LoggingController: public ConnectionTracker | ||
| 351 | button.SetLabel( STOP_BUTTON_TEXT ); | 332 | button.SetLabel( STOP_BUTTON_TEXT ); |
| 352 | button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); | 333 | button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); |
| 353 | button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT ); | 334 | button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT ); |
| 354 | - | ||
| 355 | - button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); | ||
| 356 | - button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); | ||
| 357 | - button.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) ); | ||
| 358 | - | ||
| 359 | button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked ); | 335 | button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked ); |
| 360 | 336 | ||
| 361 | timingGroupBackground.Add( button ); | 337 | timingGroupBackground.Add( button ); |
| @@ -377,11 +353,6 @@ class LoggingController: public ConnectionTracker | @@ -377,11 +353,6 @@ class LoggingController: public ConnectionTracker | ||
| 377 | button.SetLabel( ENABLE_BUTTON_TEXT ); | 353 | button.SetLabel( ENABLE_BUTTON_TEXT ); |
| 378 | button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); | 354 | button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); |
| 379 | button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT ); | 355 | button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT ); |
| 380 | - | ||
| 381 | - button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); | ||
| 382 | - button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); | ||
| 383 | - button.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) ); | ||
| 384 | - | ||
| 385 | button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked ); | 356 | button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked ); |
| 386 | 357 | ||
| 387 | enableGroupBackground.Add( button ); | 358 | enableGroupBackground.Add( button ); |
| @@ -393,11 +364,6 @@ class LoggingController: public ConnectionTracker | @@ -393,11 +364,6 @@ class LoggingController: public ConnectionTracker | ||
| 393 | button.SetLabel( DISABLE_BUTTON_TEXT ); | 364 | button.SetLabel( DISABLE_BUTTON_TEXT ); |
| 394 | button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); | 365 | button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); |
| 395 | button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT ); | 366 | button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT ); |
| 396 | - | ||
| 397 | - button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); | ||
| 398 | - button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); | ||
| 399 | - button.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) ); | ||
| 400 | - | ||
| 401 | button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked ); | 367 | button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked ); |
| 402 | 368 | ||
| 403 | enableGroupBackground.Add( button ); | 369 | enableGroupBackground.Add( button ); |
| @@ -481,11 +447,6 @@ class LoggingController: public ConnectionTracker | @@ -481,11 +447,6 @@ class LoggingController: public ConnectionTracker | ||
| 481 | button.SetLabel( VSYNC_BUTTON_TEXT ); | 447 | button.SetLabel( VSYNC_BUTTON_TEXT ); |
| 482 | button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); | 448 | button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); |
| 483 | button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT ); | 449 | button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT ); |
| 484 | - | ||
| 485 | - button.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); | ||
| 486 | - button.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); | ||
| 487 | - button.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) ); | ||
| 488 | - | ||
| 489 | button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked ); | 450 | button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked ); |
| 490 | 451 | ||
| 491 | vsyncGroupBackground.Add( button ); | 452 | vsyncGroupBackground.Add( button ); |
examples/motion-blur/motion-blur-example.cpp
| @@ -76,9 +76,12 @@ const char* BACKGROUND_IMAGE_PATH = DALI_IMAGE_DIR "background-default.png"; | @@ -76,9 +76,12 @@ const char* BACKGROUND_IMAGE_PATH = DALI_IMAGE_DIR "background-default.png"; | ||
| 76 | 76 | ||
| 77 | const char* TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" ); | 77 | const char* TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" ); |
| 78 | const char* LAYOUT_IMAGE( DALI_IMAGE_DIR "icon-change.png" ); | 78 | const char* LAYOUT_IMAGE( DALI_IMAGE_DIR "icon-change.png" ); |
| 79 | +const char* LAYOUT_IMAGE_SELECTED( DALI_IMAGE_DIR "icon-change-selected.png" ); | ||
| 79 | const char* APPLICATION_TITLE( "Motion Blur" ); | 80 | const char* APPLICATION_TITLE( "Motion Blur" ); |
| 80 | const char* EFFECTS_OFF_ICON( DALI_IMAGE_DIR "icon-effects-off.png" ); | 81 | const char* EFFECTS_OFF_ICON( DALI_IMAGE_DIR "icon-effects-off.png" ); |
| 82 | +const char* EFFECTS_OFF_ICON_SELECTED( DALI_IMAGE_DIR "icon-effects-off-selected.png" ); | ||
| 81 | const char* EFFECTS_ON_ICON( DALI_IMAGE_DIR "icon-effects-on.png" ); | 83 | const char* EFFECTS_ON_ICON( DALI_IMAGE_DIR "icon-effects-on.png" ); |
| 84 | +const char* EFFECTS_ON_ICON_SELECTED( DALI_IMAGE_DIR "icon-effects-on-selected.png" ); | ||
| 82 | 85 | ||
| 83 | const float UI_MARGIN = 4.0f; ///< Screen Margin for placement of UI buttons | 86 | const float UI_MARGIN = 4.0f; ///< Screen Margin for placement of UI buttons |
| 84 | 87 | ||
| @@ -164,17 +167,22 @@ public: | @@ -164,17 +167,22 @@ public: | ||
| 164 | 167 | ||
| 165 | //Add an effects icon on the right of the title | 168 | //Add an effects icon on the right of the title |
| 166 | mIconEffectsOff = ResourceImage::New( EFFECTS_OFF_ICON ); | 169 | mIconEffectsOff = ResourceImage::New( EFFECTS_OFF_ICON ); |
| 170 | + mIconEffectsOffSelected = ResourceImage::New( EFFECTS_OFF_ICON_SELECTED ); | ||
| 167 | mIconEffectsOn = ResourceImage::New( EFFECTS_ON_ICON ); | 171 | mIconEffectsOn = ResourceImage::New( EFFECTS_ON_ICON ); |
| 172 | + mIconEffectsOnSelected = ResourceImage::New( EFFECTS_ON_ICON_SELECTED ); | ||
| 168 | mActorEffectsButton = Toolkit::PushButton::New(); | 173 | mActorEffectsButton = Toolkit::PushButton::New(); |
| 169 | - mActorEffectsButton.SetBackgroundImage( mIconEffectsOff ); | 174 | + mActorEffectsButton.SetButtonImage( mIconEffectsOff ); |
| 175 | + mActorEffectsButton.SetSelectedImage( mIconEffectsOffSelected ); | ||
| 170 | mActorEffectsButton.ClickedSignal().Connect( this, &MotionBlurExampleApp::OnEffectButtonClicked ); | 176 | mActorEffectsButton.ClickedSignal().Connect( this, &MotionBlurExampleApp::OnEffectButtonClicked ); |
| 171 | mToolBar.AddControl( mActorEffectsButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalCenter, DemoHelper::DEFAULT_PLAY_PADDING ); | 177 | mToolBar.AddControl( mActorEffectsButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalCenter, DemoHelper::DEFAULT_PLAY_PADDING ); |
| 172 | 178 | ||
| 173 | // Creates a mode button. | 179 | // Creates a mode button. |
| 174 | // Create a effect toggle button. (right of toolbar) | 180 | // Create a effect toggle button. (right of toolbar) |
| 175 | Image imageLayout = ResourceImage::New( LAYOUT_IMAGE ); | 181 | Image imageLayout = ResourceImage::New( LAYOUT_IMAGE ); |
| 182 | + Image imageLayoutSelected = ResourceImage::New( LAYOUT_IMAGE_SELECTED ); | ||
| 176 | Toolkit::PushButton layoutButton = Toolkit::PushButton::New(); | 183 | Toolkit::PushButton layoutButton = Toolkit::PushButton::New(); |
| 177 | - layoutButton.SetBackgroundImage(imageLayout); | 184 | + layoutButton.SetButtonImage( imageLayout ); |
| 185 | + layoutButton.SetSelectedImage( imageLayoutSelected ); | ||
| 178 | layoutButton.ClickedSignal().Connect( this, &MotionBlurExampleApp::OnLayoutButtonClicked); | 186 | layoutButton.ClickedSignal().Connect( this, &MotionBlurExampleApp::OnLayoutButtonClicked); |
| 179 | layoutButton.SetLeaveRequired( true ); | 187 | layoutButton.SetLeaveRequired( true ); |
| 180 | mToolBar.AddControl( layoutButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); | 188 | mToolBar.AddControl( layoutButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); |
| @@ -447,12 +455,14 @@ public: | @@ -447,12 +455,14 @@ public: | ||
| 447 | if(!mActorEffectsEnabled) | 455 | if(!mActorEffectsEnabled) |
| 448 | { | 456 | { |
| 449 | mActorEffectsEnabled = true; | 457 | mActorEffectsEnabled = true; |
| 450 | - mActorEffectsButton.SetBackgroundImage( mIconEffectsOn ); | 458 | + mActorEffectsButton.SetButtonImage( mIconEffectsOn ); |
| 459 | + mActorEffectsButton.SetSelectedImage( mIconEffectsOnSelected ); | ||
| 451 | } | 460 | } |
| 452 | else | 461 | else |
| 453 | { | 462 | { |
| 454 | mActorEffectsEnabled = false; | 463 | mActorEffectsEnabled = false; |
| 455 | - mActorEffectsButton.SetBackgroundImage( mIconEffectsOff ); | 464 | + mActorEffectsButton.SetButtonImage( mIconEffectsOff ); |
| 465 | + mActorEffectsButton.SetSelectedImage( mIconEffectsOffSelected ); | ||
| 456 | } | 466 | } |
| 457 | } | 467 | } |
| 458 | 468 | ||
| @@ -513,7 +523,9 @@ private: | @@ -513,7 +523,9 @@ private: | ||
| 513 | Toolkit::Control mView; | 523 | Toolkit::Control mView; |
| 514 | Toolkit::ToolBar mToolBar; | 524 | Toolkit::ToolBar mToolBar; |
| 515 | Image mIconEffectsOff; | 525 | Image mIconEffectsOff; |
| 526 | + Image mIconEffectsOffSelected; | ||
| 516 | Image mIconEffectsOn; | 527 | Image mIconEffectsOn; |
| 528 | + Image mIconEffectsOnSelected; | ||
| 517 | 529 | ||
| 518 | Layer mContentLayer; ///< Content layer (contains actor for this blur demo) | 530 | Layer mContentLayer; ///< Content layer (contains actor for this blur demo) |
| 519 | 531 |
examples/motion-stretch/motion-stretch-example.cpp
| @@ -62,9 +62,12 @@ const char* BACKGROUND_IMAGE_PATH = DALI_IMAGE_DIR "background-default.png"; | @@ -62,9 +62,12 @@ const char* BACKGROUND_IMAGE_PATH = DALI_IMAGE_DIR "background-default.png"; | ||
| 62 | 62 | ||
| 63 | const char* TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" ); | 63 | const char* TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" ); |
| 64 | const char* LAYOUT_IMAGE( DALI_IMAGE_DIR "icon-change.png" ); | 64 | const char* LAYOUT_IMAGE( DALI_IMAGE_DIR "icon-change.png" ); |
| 65 | +const char* LAYOUT_IMAGE_SELECTED( DALI_IMAGE_DIR "icon-change-selected.png" ); | ||
| 65 | const char* APPLICATION_TITLE( "Motion Stretch" ); | 66 | const char* APPLICATION_TITLE( "Motion Stretch" ); |
| 66 | const char* EFFECTS_OFF_ICON( DALI_IMAGE_DIR "icon-effects-off.png" ); | 67 | const char* EFFECTS_OFF_ICON( DALI_IMAGE_DIR "icon-effects-off.png" ); |
| 68 | +const char* EFFECTS_OFF_ICON_SELECTED( DALI_IMAGE_DIR "icon-effects-off-selected.png" ); | ||
| 67 | const char* EFFECTS_ON_ICON( DALI_IMAGE_DIR "icon-effects-on.png" ); | 69 | const char* EFFECTS_ON_ICON( DALI_IMAGE_DIR "icon-effects-on.png" ); |
| 70 | +const char* EFFECTS_ON_ICON_SELECTED( DALI_IMAGE_DIR "icon-effects-on-selected.png" ); | ||
| 68 | 71 | ||
| 69 | // These values depend on the button background image | 72 | // These values depend on the button background image |
| 70 | const Vector4 BUTTON_IMAGE_BORDER( Vector4::ONE * 3.0f ); | 73 | const Vector4 BUTTON_IMAGE_BORDER( Vector4::ONE * 3.0f ); |
| @@ -138,17 +141,22 @@ public: | @@ -138,17 +141,22 @@ public: | ||
| 138 | 141 | ||
| 139 | //Add an slideshow icon on the right of the title | 142 | //Add an slideshow icon on the right of the title |
| 140 | mIconEffectsOff = ResourceImage::New( EFFECTS_OFF_ICON ); | 143 | mIconEffectsOff = ResourceImage::New( EFFECTS_OFF_ICON ); |
| 144 | + mIconEffectsOffSelected = ResourceImage::New( EFFECTS_OFF_ICON_SELECTED ); | ||
| 141 | mIconEffectsOn = ResourceImage::New( EFFECTS_ON_ICON ); | 145 | mIconEffectsOn = ResourceImage::New( EFFECTS_ON_ICON ); |
| 146 | + mIconEffectsOnSelected = ResourceImage::New( EFFECTS_ON_ICON_SELECTED ); | ||
| 142 | mActorEffectsButton = Toolkit::PushButton::New(); | 147 | mActorEffectsButton = Toolkit::PushButton::New(); |
| 143 | - mActorEffectsButton.SetBackgroundImage( mIconEffectsOff ); | 148 | + mActorEffectsButton.SetButtonImage( mIconEffectsOff ); |
| 149 | + mActorEffectsButton.SetSelectedImage( mIconEffectsOffSelected ); | ||
| 144 | mActorEffectsButton.ClickedSignal().Connect( this, &MotionStretchExampleApp::OnEffectButtonClicked ); | 150 | mActorEffectsButton.ClickedSignal().Connect( this, &MotionStretchExampleApp::OnEffectButtonClicked ); |
| 145 | mToolBar.AddControl( mActorEffectsButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalCenter, DemoHelper::DEFAULT_PLAY_PADDING ); | 151 | mToolBar.AddControl( mActorEffectsButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalCenter, DemoHelper::DEFAULT_PLAY_PADDING ); |
| 146 | 152 | ||
| 147 | // Creates a mode button. | 153 | // Creates a mode button. |
| 148 | // Create a effect toggle button. (right of toolbar) | 154 | // Create a effect toggle button. (right of toolbar) |
| 149 | Image imageLayout = ResourceImage::New( LAYOUT_IMAGE ); | 155 | Image imageLayout = ResourceImage::New( LAYOUT_IMAGE ); |
| 156 | + Image imageLayoutSelected = ResourceImage::New( LAYOUT_IMAGE_SELECTED ); | ||
| 150 | Toolkit::PushButton layoutButton = Toolkit::PushButton::New(); | 157 | Toolkit::PushButton layoutButton = Toolkit::PushButton::New(); |
| 151 | - layoutButton.SetBackgroundImage(imageLayout); | 158 | + layoutButton.SetButtonImage( imageLayout ); |
| 159 | + layoutButton.SetSelectedImage( imageLayoutSelected ); | ||
| 152 | layoutButton.ClickedSignal().Connect( this, &MotionStretchExampleApp::OnLayoutButtonClicked); | 160 | layoutButton.ClickedSignal().Connect( this, &MotionStretchExampleApp::OnLayoutButtonClicked); |
| 153 | layoutButton.SetLeaveRequired( true ); | 161 | layoutButton.SetLeaveRequired( true ); |
| 154 | mToolBar.AddControl( layoutButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); | 162 | mToolBar.AddControl( layoutButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); |
| @@ -341,12 +349,14 @@ public: | @@ -341,12 +349,14 @@ public: | ||
| 341 | if(!mActorEffectsEnabled) | 349 | if(!mActorEffectsEnabled) |
| 342 | { | 350 | { |
| 343 | mActorEffectsEnabled = true; | 351 | mActorEffectsEnabled = true; |
| 344 | - mActorEffectsButton.SetBackgroundImage( mIconEffectsOn ); | 352 | + mActorEffectsButton.SetButtonImage( mIconEffectsOn ); |
| 353 | + mActorEffectsButton.SetSelectedImage( mIconEffectsOnSelected ); | ||
| 345 | } | 354 | } |
| 346 | else | 355 | else |
| 347 | { | 356 | { |
| 348 | mActorEffectsEnabled = false; | 357 | mActorEffectsEnabled = false; |
| 349 | - mActorEffectsButton.SetBackgroundImage( mIconEffectsOff ); | 358 | + mActorEffectsButton.SetButtonImage( mIconEffectsOff ); |
| 359 | + mActorEffectsButton.SetSelectedImage( mIconEffectsOffSelected ); | ||
| 350 | } | 360 | } |
| 351 | } | 361 | } |
| 352 | 362 | ||
| @@ -407,7 +417,9 @@ private: | @@ -407,7 +417,9 @@ private: | ||
| 407 | Toolkit::Control mView; | 417 | Toolkit::Control mView; |
| 408 | Toolkit::ToolBar mToolBar; | 418 | Toolkit::ToolBar mToolBar; |
| 409 | Image mIconEffectsOff; | 419 | Image mIconEffectsOff; |
| 420 | + Image mIconEffectsOffSelected; | ||
| 410 | Image mIconEffectsOn; | 421 | Image mIconEffectsOn; |
| 422 | + Image mIconEffectsOnSelected; | ||
| 411 | Layer mContentLayer; ///< Content layer (contains actor for this stretch demo) | 423 | Layer mContentLayer; ///< Content layer (contains actor for this stretch demo) |
| 412 | 424 | ||
| 413 | PushButton mActorEffectsButton; ///< The actor effects toggling Button. | 425 | PushButton mActorEffectsButton; ///< The actor effects toggling Button. |
examples/new-window/new-window-example.cpp
| @@ -35,6 +35,7 @@ namespace | @@ -35,6 +35,7 @@ namespace | ||
| 35 | const char * const BACKGROUND_IMAGE( DALI_IMAGE_DIR "background-2.jpg" ); | 35 | const char * const BACKGROUND_IMAGE( DALI_IMAGE_DIR "background-2.jpg" ); |
| 36 | const char * const TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" ); | 36 | const char * const TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" ); |
| 37 | const char * const LOSE_CONTEXT_IMAGE( DALI_IMAGE_DIR "icon-cluster-wobble.png" ); | 37 | const char * const LOSE_CONTEXT_IMAGE( DALI_IMAGE_DIR "icon-cluster-wobble.png" ); |
| 38 | +const char * const LOSE_CONTEXT_IMAGE_SELECTED( DALI_IMAGE_DIR "icon-cluster-wobble-selected.png" ); | ||
| 38 | const char * const BASE_IMAGE( DALI_IMAGE_DIR "gallery-large-14.jpg" ); | 39 | const char * const BASE_IMAGE( DALI_IMAGE_DIR "gallery-large-14.jpg" ); |
| 39 | const char * const EFFECT_IMAGE( DALI_IMAGE_DIR "gallery-large-18.jpg" ); | 40 | const char * const EFFECT_IMAGE( DALI_IMAGE_DIR "gallery-large-18.jpg" ); |
| 40 | const char * const LOGO_IMAGE(DALI_IMAGE_DIR "dali-logo.png"); | 41 | const char * const LOGO_IMAGE(DALI_IMAGE_DIR "dali-logo.png"); |
| @@ -198,7 +199,8 @@ void NewWindowController::Create( Application& app ) | @@ -198,7 +199,8 @@ void NewWindowController::Create( Application& app ) | ||
| 198 | } | 199 | } |
| 199 | 200 | ||
| 200 | mLoseContextButton = Toolkit::PushButton::New(); | 201 | mLoseContextButton = Toolkit::PushButton::New(); |
| 201 | - mLoseContextButton.SetBackgroundImage( ResourceImage::New( LOSE_CONTEXT_IMAGE ) ); | 202 | + mLoseContextButton.SetButtonImage( ResourceImage::New( LOSE_CONTEXT_IMAGE ) ); |
| 203 | + mLoseContextButton.SetSelectedImage( ResourceImage::New( LOSE_CONTEXT_IMAGE_SELECTED ) ); | ||
| 202 | mLoseContextButton.ClickedSignal().Connect( this, &NewWindowController::OnLoseContextButtonClicked ); | 204 | mLoseContextButton.ClickedSignal().Connect( this, &NewWindowController::OnLoseContextButtonClicked ); |
| 203 | mToolBar.AddControl( mLoseContextButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); | 205 | mToolBar.AddControl( mLoseContextButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); |
| 204 | 206 |
examples/radial-menu/radial-menu-example.cpp
| @@ -33,7 +33,9 @@ const char* TEST_DIAL_FILENAME = DALI_IMAGE_DIR "layer4.png"; // Image to be mas | @@ -33,7 +33,9 @@ const char* TEST_DIAL_FILENAME = DALI_IMAGE_DIR "layer4.png"; // Image to be mas | ||
| 33 | const char* TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" ); // Background for toolbar | 33 | const char* TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" ); // Background for toolbar |
| 34 | const char* APPLICATION_TITLE( "Radial Menu" ); | 34 | const char* APPLICATION_TITLE( "Radial Menu" ); |
| 35 | const char * const PLAY_ICON( DALI_IMAGE_DIR "icon-play.png" ); | 35 | const char * const PLAY_ICON( DALI_IMAGE_DIR "icon-play.png" ); |
| 36 | +const char * const PLAY_ICON_SELECTED( DALI_IMAGE_DIR "icon-play-selected.png" ); | ||
| 36 | const char * const STOP_ICON( DALI_IMAGE_DIR "icon-stop.png" ); | 37 | const char * const STOP_ICON( DALI_IMAGE_DIR "icon-stop.png" ); |
| 38 | +const char * const STOP_ICON_SELECTED( DALI_IMAGE_DIR "icon-stop-selected.png" ); | ||
| 37 | } | 39 | } |
| 38 | 40 | ||
| 39 | 41 | ||
| @@ -107,7 +109,9 @@ private: // Member variables | @@ -107,7 +109,9 @@ private: // Member variables | ||
| 107 | AnimState mAnimationState; | 109 | AnimState mAnimationState; |
| 108 | 110 | ||
| 109 | Image mIconPlay; | 111 | Image mIconPlay; |
| 112 | + Image mIconPlaySelected; | ||
| 110 | Image mIconStop; | 113 | Image mIconStop; |
| 114 | + Image mIconStopSelected; | ||
| 111 | Toolkit::PushButton mPlayStopButton; | 115 | Toolkit::PushButton mPlayStopButton; |
| 112 | ImageActor mDialActor; | 116 | ImageActor mDialActor; |
| 113 | RadialSweepView mRadialSweepView1; | 117 | RadialSweepView mRadialSweepView1; |
| @@ -145,9 +149,12 @@ void RadialMenuExample::OnInit(Application& app) | @@ -145,9 +149,12 @@ void RadialMenuExample::OnInit(Application& app) | ||
| 145 | APPLICATION_TITLE ); | 149 | APPLICATION_TITLE ); |
| 146 | 150 | ||
| 147 | mIconPlay = ResourceImage::New( PLAY_ICON ); | 151 | mIconPlay = ResourceImage::New( PLAY_ICON ); |
| 152 | + mIconPlaySelected = ResourceImage::New( PLAY_ICON_SELECTED ); | ||
| 148 | mIconStop = ResourceImage::New( STOP_ICON ); | 153 | mIconStop = ResourceImage::New( STOP_ICON ); |
| 154 | + mIconStopSelected = ResourceImage::New( STOP_ICON_SELECTED ); | ||
| 149 | mPlayStopButton = Toolkit::PushButton::New(); | 155 | mPlayStopButton = Toolkit::PushButton::New(); |
| 150 | - mPlayStopButton.SetBackgroundImage( mIconStop ); | 156 | + mPlayStopButton.SetButtonImage( mIconStop ); |
| 157 | + mPlayStopButton.SetSelectedImage( mIconStopSelected ); | ||
| 151 | 158 | ||
| 152 | mPlayStopButton.ClickedSignal().Connect( this, &RadialMenuExample::OnButtonClicked ); | 159 | mPlayStopButton.ClickedSignal().Connect( this, &RadialMenuExample::OnButtonClicked ); |
| 153 | 160 | ||
| @@ -216,7 +223,8 @@ bool RadialMenuExample::OnButtonClicked( Toolkit::Button button ) | @@ -216,7 +223,8 @@ bool RadialMenuExample::OnButtonClicked( Toolkit::Button button ) | ||
| 216 | { | 223 | { |
| 217 | mAnimation.Pause(); | 224 | mAnimation.Pause(); |
| 218 | mAnimationState = PAUSED; | 225 | mAnimationState = PAUSED; |
| 219 | - mPlayStopButton.SetBackgroundImage( mIconPlay ); | 226 | + mPlayStopButton.SetButtonImage( mIconPlay ); |
| 227 | + mPlayStopButton.SetSelectedImage( mIconPlaySelected ); | ||
| 220 | } | 228 | } |
| 221 | break; | 229 | break; |
| 222 | 230 | ||
| @@ -224,13 +232,15 @@ bool RadialMenuExample::OnButtonClicked( Toolkit::Button button ) | @@ -224,13 +232,15 @@ bool RadialMenuExample::OnButtonClicked( Toolkit::Button button ) | ||
| 224 | { | 232 | { |
| 225 | mAnimation.Play(); | 233 | mAnimation.Play(); |
| 226 | mAnimationState = PLAYING; | 234 | mAnimationState = PLAYING; |
| 227 | - mPlayStopButton.SetBackgroundImage( mIconStop ); | 235 | + mPlayStopButton.SetButtonImage( mIconStop ); |
| 236 | + mPlayStopButton.SetSelectedImage( mIconStopSelected ); | ||
| 228 | } | 237 | } |
| 229 | break; | 238 | break; |
| 230 | 239 | ||
| 231 | case STOPPED: | 240 | case STOPPED: |
| 232 | { | 241 | { |
| 233 | - mPlayStopButton.SetBackgroundImage( mIconStop ); | 242 | + mPlayStopButton.SetButtonImage( mIconStop ); |
| 243 | + mPlayStopButton.SetSelectedImage( mIconStopSelected ); | ||
| 234 | mRadialSweepView1.Deactivate(); | 244 | mRadialSweepView1.Deactivate(); |
| 235 | mRadialSweepView2.Deactivate(); | 245 | mRadialSweepView2.Deactivate(); |
| 236 | mRadialSweepView3.Deactivate(); | 246 | mRadialSweepView3.Deactivate(); |
| @@ -243,7 +253,8 @@ bool RadialMenuExample::OnButtonClicked( Toolkit::Button button ) | @@ -243,7 +253,8 @@ bool RadialMenuExample::OnButtonClicked( Toolkit::Button button ) | ||
| 243 | void RadialMenuExample::OnAnimationFinished( Animation& source ) | 253 | void RadialMenuExample::OnAnimationFinished( Animation& source ) |
| 244 | { | 254 | { |
| 245 | mAnimationState = STOPPED; | 255 | mAnimationState = STOPPED; |
| 246 | - mPlayStopButton.SetBackgroundImage( mIconPlay ); | 256 | + mPlayStopButton.SetButtonImage( mIconPlay ); |
| 257 | + mPlayStopButton.SetSelectedImage( mIconPlaySelected ); | ||
| 247 | } | 258 | } |
| 248 | 259 | ||
| 249 | RadialSweepView RadialMenuExample::CreateSweepView( std::string imageName, | 260 | RadialSweepView RadialMenuExample::CreateSweepView( std::string imageName, |
examples/refraction-effect/refraction-effect-example.cpp
| @@ -34,7 +34,9 @@ namespace | @@ -34,7 +34,9 @@ namespace | ||
| 34 | const char * const APPLICATION_TITLE( "Refraction Effect" ); | 34 | const char * const APPLICATION_TITLE( "Refraction Effect" ); |
| 35 | const char * const TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" ); | 35 | const char * const TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" ); |
| 36 | const char * const CHANGE_TEXTURE_ICON( DALI_IMAGE_DIR "icon-change.png" ); | 36 | const char * const CHANGE_TEXTURE_ICON( DALI_IMAGE_DIR "icon-change.png" ); |
| 37 | +const char * const CHANGE_TEXTURE_ICON_SELECTED( DALI_IMAGE_DIR "icon-change-selected.png" ); | ||
| 37 | const char * const CHANGE_MESH_ICON( DALI_IMAGE_DIR "icon-replace.png" ); | 38 | const char * const CHANGE_MESH_ICON( DALI_IMAGE_DIR "icon-replace.png" ); |
| 39 | +const char * const CHANGE_MESH_ICON_SELECTED( DALI_IMAGE_DIR "icon-replace-selected.png" ); | ||
| 38 | 40 | ||
| 39 | const char* MESH_FILES[] = | 41 | const char* MESH_FILES[] = |
| 40 | { | 42 | { |
| @@ -255,7 +257,8 @@ private: | @@ -255,7 +257,8 @@ private: | ||
| 255 | 257 | ||
| 256 | // Add a button to change background. (right of toolbar) | 258 | // Add a button to change background. (right of toolbar) |
| 257 | mChangeTextureButton = Toolkit::PushButton::New(); | 259 | mChangeTextureButton = Toolkit::PushButton::New(); |
| 258 | - mChangeTextureButton.SetBackgroundImage( ResourceImage::New( CHANGE_TEXTURE_ICON ) ); | 260 | + mChangeTextureButton.SetButtonImage( ResourceImage::New( CHANGE_TEXTURE_ICON ) ); |
| 261 | + mChangeTextureButton.SetSelectedImage( ResourceImage::New( CHANGE_TEXTURE_ICON_SELECTED ) ); | ||
| 259 | mChangeTextureButton.ClickedSignal().Connect( this, &RefractionEffectExample::OnChangeTexture ); | 262 | mChangeTextureButton.ClickedSignal().Connect( this, &RefractionEffectExample::OnChangeTexture ); |
| 260 | toolBar.AddControl( mChangeTextureButton, | 263 | toolBar.AddControl( mChangeTextureButton, |
| 261 | DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, | 264 | DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, |
| @@ -263,7 +266,8 @@ private: | @@ -263,7 +266,8 @@ private: | ||
| 263 | DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); | 266 | DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); |
| 264 | // Add a button to change mesh pattern. ( left of bar ) | 267 | // Add a button to change mesh pattern. ( left of bar ) |
| 265 | mChangeMeshButton = Toolkit::PushButton::New(); | 268 | mChangeMeshButton = Toolkit::PushButton::New(); |
| 266 | - mChangeMeshButton.SetBackgroundImage( ResourceImage::New( CHANGE_MESH_ICON ) ); | 269 | + mChangeMeshButton.SetButtonImage( ResourceImage::New( CHANGE_MESH_ICON ) ); |
| 270 | + mChangeMeshButton.SetSelectedImage( ResourceImage::New( CHANGE_MESH_ICON_SELECTED ) ); | ||
| 267 | mChangeMeshButton.ClickedSignal().Connect( this, &RefractionEffectExample::OnChangeMesh ); | 271 | mChangeMeshButton.ClickedSignal().Connect( this, &RefractionEffectExample::OnChangeMesh ); |
| 268 | toolBar.AddControl( mChangeMeshButton, | 272 | toolBar.AddControl( mChangeMeshButton, |
| 269 | DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, | 273 | DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, |
examples/scroll-view/scroll-view-example.cpp
| @@ -32,6 +32,7 @@ const char * const BACKGROUND_IMAGE( DALI_IMAGE_DIR "background-default.png" ); | @@ -32,6 +32,7 @@ const char * const BACKGROUND_IMAGE( DALI_IMAGE_DIR "background-default.png" ); | ||
| 32 | const char * const TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" ); | 32 | const char * const TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" ); |
| 33 | const char * const APPLICATION_TITLE( "ScrollView" ); | 33 | const char * const APPLICATION_TITLE( "ScrollView" ); |
| 34 | const char * const EFFECT_CAROUSEL_IMAGE( DALI_IMAGE_DIR "icon-scroll-view-carousel.png" ); | 34 | const char * const EFFECT_CAROUSEL_IMAGE( DALI_IMAGE_DIR "icon-scroll-view-carousel.png" ); |
| 35 | +const char * const EFFECT_CAROUSEL_IMAGE_SELECTED( DALI_IMAGE_DIR "icon-scroll-view-carousel-selected.png" ); | ||
| 35 | 36 | ||
| 36 | const Vector3 ICON_SIZE(100.0f, 100.0f, 0.0f); | 37 | const Vector3 ICON_SIZE(100.0f, 100.0f, 0.0f); |
| 37 | 38 | ||
| @@ -173,9 +174,13 @@ public: | @@ -173,9 +174,13 @@ public: | ||
| 173 | "" ); | 174 | "" ); |
| 174 | 175 | ||
| 175 | mEffectIcon[ PageCarouselEffect ] = ResourceImage::New( EFFECT_CAROUSEL_IMAGE ); | 176 | mEffectIcon[ PageCarouselEffect ] = ResourceImage::New( EFFECT_CAROUSEL_IMAGE ); |
| 177 | + mEffectIconSelected[ PageCarouselEffect ] = ResourceImage::New( EFFECT_CAROUSEL_IMAGE_SELECTED ); | ||
| 176 | mEffectIcon[ PageCubeEffect ] = ResourceImage::New( EFFECT_CAROUSEL_IMAGE ); | 178 | mEffectIcon[ PageCubeEffect ] = ResourceImage::New( EFFECT_CAROUSEL_IMAGE ); |
| 179 | + mEffectIconSelected[ PageCubeEffect ] = ResourceImage::New( EFFECT_CAROUSEL_IMAGE_SELECTED ); | ||
| 177 | mEffectIcon[ PageSpiralEffect ] = ResourceImage::New( EFFECT_CAROUSEL_IMAGE ); | 180 | mEffectIcon[ PageSpiralEffect ] = ResourceImage::New( EFFECT_CAROUSEL_IMAGE ); |
| 181 | + mEffectIconSelected[ PageSpiralEffect ] = ResourceImage::New( EFFECT_CAROUSEL_IMAGE_SELECTED ); | ||
| 178 | mEffectIcon[ PageWaveEffect ] = ResourceImage::New( EFFECT_CAROUSEL_IMAGE ); | 182 | mEffectIcon[ PageWaveEffect ] = ResourceImage::New( EFFECT_CAROUSEL_IMAGE ); |
| 183 | + mEffectIconSelected[ PageWaveEffect ] = ResourceImage::New( EFFECT_CAROUSEL_IMAGE_SELECTED ); | ||
| 179 | 184 | ||
| 180 | // Create a effect change button. (right of toolbar) | 185 | // Create a effect change button. (right of toolbar) |
| 181 | mEffectChangeButton = Toolkit::PushButton::New(); | 186 | mEffectChangeButton = Toolkit::PushButton::New(); |
| @@ -239,7 +244,8 @@ private: | @@ -239,7 +244,8 @@ private: | ||
| 239 | ss << APPLICATION_TITLE << ": " << EFFECT_MODE_NAME[mEffectMode]; | 244 | ss << APPLICATION_TITLE << ": " << EFFECT_MODE_NAME[mEffectMode]; |
| 240 | SetTitle(ss.str()); | 245 | SetTitle(ss.str()); |
| 241 | 246 | ||
| 242 | - mEffectChangeButton.SetBackgroundImage( mEffectIcon[ mEffectMode ] ); | 247 | + mEffectChangeButton.SetButtonImage( mEffectIcon[ mEffectMode ] ); |
| 248 | + mEffectChangeButton.SetSelectedImage( mEffectIconSelected[ mEffectMode ] ); | ||
| 243 | 249 | ||
| 244 | // remove old Effect if exists. | 250 | // remove old Effect if exists. |
| 245 | if(mScrollViewEffect) | 251 | if(mScrollViewEffect) |
| @@ -577,6 +583,7 @@ private: | @@ -577,6 +583,7 @@ private: | ||
| 577 | EffectMode mEffectMode; ///< Current Effect mode | 583 | EffectMode mEffectMode; ///< Current Effect mode |
| 578 | 584 | ||
| 579 | Image mEffectIcon[Total]; ///< Icons for the effect button | 585 | Image mEffectIcon[Total]; ///< Icons for the effect button |
| 586 | + Image mEffectIconSelected[Total]; ///< Icons for the effect button when its selected | ||
| 580 | Toolkit::PushButton mEffectChangeButton; ///< Effect Change Button | 587 | Toolkit::PushButton mEffectChangeButton; ///< Effect Change Button |
| 581 | }; | 588 | }; |
| 582 | 589 |
examples/shadow-bone-lighting/shadow-bone-lighting-example.cpp
| @@ -39,7 +39,9 @@ const char* APPLICATION_TITLE_PAN_OBJECT( "Lighting: Rotate Object" ); | @@ -39,7 +39,9 @@ const char* APPLICATION_TITLE_PAN_OBJECT( "Lighting: Rotate Object" ); | ||
| 39 | const char* APPLICATION_TITLE_PAN_SCENE( "Lighting: Pan Scene" ); | 39 | const char* APPLICATION_TITLE_PAN_SCENE( "Lighting: Pan Scene" ); |
| 40 | const char* APPLICATION_TITLE_ROTATE_SCENE( "Lighting: Rotate Scene" ); | 40 | const char* APPLICATION_TITLE_ROTATE_SCENE( "Lighting: Rotate Scene" ); |
| 41 | const char* CHANGE_EFFECT_IMAGE( DALI_IMAGE_DIR "icon-change.png" ); | 41 | const char* CHANGE_EFFECT_IMAGE( DALI_IMAGE_DIR "icon-change.png" ); |
| 42 | +const char* CHANGE_EFFECT_IMAGE_SELECTED( DALI_IMAGE_DIR "icon-change-selected.png" ); | ||
| 42 | const char* RESET_ICON( DALI_IMAGE_DIR "icon-reset.png" ); | 43 | const char* RESET_ICON( DALI_IMAGE_DIR "icon-reset.png" ); |
| 44 | +const char* RESET_ICON_SELECTED( DALI_IMAGE_DIR "icon-reset-selected.png" ); | ||
| 43 | 45 | ||
| 44 | const char* SCENE_IMAGE_1( DALI_IMAGE_DIR "gallery-small-10.jpg"); | 46 | const char* SCENE_IMAGE_1( DALI_IMAGE_DIR "gallery-small-10.jpg"); |
| 45 | const char* SCENE_IMAGE_2( DALI_IMAGE_DIR "gallery-small-42.jpg"); | 47 | const char* SCENE_IMAGE_2( DALI_IMAGE_DIR "gallery-small-42.jpg"); |
| @@ -145,8 +147,10 @@ public: | @@ -145,8 +147,10 @@ public: | ||
| 145 | 147 | ||
| 146 | // Add an effect-changing button on the right of the tool bar. | 148 | // Add an effect-changing button on the right of the tool bar. |
| 147 | Image imageChangeEffect = ResourceImage::New( CHANGE_EFFECT_IMAGE ); | 149 | Image imageChangeEffect = ResourceImage::New( CHANGE_EFFECT_IMAGE ); |
| 150 | + Image imageChangeEffectSelected = ResourceImage::New( CHANGE_EFFECT_IMAGE_SELECTED ); | ||
| 148 | Toolkit::PushButton effectChangeButton = Toolkit::PushButton::New(); | 151 | Toolkit::PushButton effectChangeButton = Toolkit::PushButton::New(); |
| 149 | - effectChangeButton.SetBackgroundImage(imageChangeEffect); | 152 | + effectChangeButton.SetButtonImage( imageChangeEffect ); |
| 153 | + effectChangeButton.SetSelectedImage( imageChangeEffectSelected ); | ||
| 150 | effectChangeButton.ClickedSignal().Connect( this, &TestApp::OnEffectButtonClicked ); | 154 | effectChangeButton.ClickedSignal().Connect( this, &TestApp::OnEffectButtonClicked ); |
| 151 | toolBar.AddControl( effectChangeButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); | 155 | toolBar.AddControl( effectChangeButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); |
| 152 | 156 | ||
| @@ -159,8 +163,10 @@ public: | @@ -159,8 +163,10 @@ public: | ||
| 159 | 163 | ||
| 160 | //Add a reset button | 164 | //Add a reset button |
| 161 | Image resetImage = ResourceImage::New( RESET_ICON ); | 165 | Image resetImage = ResourceImage::New( RESET_ICON ); |
| 166 | + Image resetImageSelected = ResourceImage::New( RESET_ICON_SELECTED ); | ||
| 162 | Toolkit::PushButton resetButton = Toolkit::PushButton::New(); | 167 | Toolkit::PushButton resetButton = Toolkit::PushButton::New(); |
| 163 | - resetButton.SetBackgroundImage( resetImage ); | 168 | + resetButton.SetButtonImage( resetImage ); |
| 169 | + resetButton.SetSelectedImage( resetImageSelected ); | ||
| 164 | resetButton.ClickedSignal().Connect( this, &TestApp::OnResetPressed ); | 170 | resetButton.ClickedSignal().Connect( this, &TestApp::OnResetPressed ); |
| 165 | toolBar.AddControl( resetButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalCenter, DemoHelper::DEFAULT_PLAY_PADDING ); | 171 | toolBar.AddControl( resetButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalCenter, DemoHelper::DEFAULT_PLAY_PADDING ); |
| 166 | 172 |
examples/size-negotiation/size-negotiation-example.cpp
| @@ -45,9 +45,7 @@ const char* const TOOLBAR_TITLE = "Negotiate Size"; | @@ -45,9 +45,7 @@ const char* const TOOLBAR_TITLE = "Negotiate Size"; | ||
| 45 | const int TOOLBAR_HEIGHT = 62; | 45 | const int TOOLBAR_HEIGHT = 62; |
| 46 | 46 | ||
| 47 | const char* MENU_ICON_IMAGE = DALI_IMAGE_DIR "icon-cluster-none.png"; | 47 | const char* MENU_ICON_IMAGE = DALI_IMAGE_DIR "icon-cluster-none.png"; |
| 48 | - | ||
| 49 | -const char* const PUSHBUTTON_BUTTON_IMAGE = DALI_IMAGE_DIR "button-up.9.png"; | ||
| 50 | -const char* const PUSHBUTTON_PRESS_IMAGE = DALI_IMAGE_DIR "button-down.9.png"; | 48 | +const char* MENU_ICON_IMAGE_SELECTED = DALI_IMAGE_DIR "icon-cluster-none-selected.png"; |
| 51 | 49 | ||
| 52 | const char* const POPUPS_MENU_ID = "POPUPS_MENU"; | 50 | const char* const POPUPS_MENU_ID = "POPUPS_MENU"; |
| 53 | const char* const TABLEVIEW_MENU_ID = "TABLEVIEW_MENU"; | 51 | const char* const TABLEVIEW_MENU_ID = "TABLEVIEW_MENU"; |
| @@ -178,7 +176,8 @@ public: | @@ -178,7 +176,8 @@ public: | ||
| 178 | 176 | ||
| 179 | // Create menu button | 177 | // Create menu button |
| 180 | Toolkit::PushButton viewButton = Toolkit::PushButton::New(); | 178 | Toolkit::PushButton viewButton = Toolkit::PushButton::New(); |
| 181 | - viewButton.SetBackgroundImage( ResourceImage::New( MENU_ICON_IMAGE ) ); | 179 | + viewButton.SetButtonImage( ResourceImage::New( MENU_ICON_IMAGE ) ); |
| 180 | + viewButton.SetSelectedImage( ResourceImage::New( MENU_ICON_IMAGE_SELECTED ) ); | ||
| 182 | viewButton.ClickedSignal().Connect( this, &SizeNegotiationController::OnMenu ); | 181 | viewButton.ClickedSignal().Connect( this, &SizeNegotiationController::OnMenu ); |
| 183 | mToolBar.AddControl( viewButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalLeft, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); | 182 | mToolBar.AddControl( viewButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalLeft, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); |
| 184 | 183 | ||
| @@ -261,6 +260,8 @@ public: | @@ -261,6 +260,8 @@ public: | ||
| 261 | Toolkit::PushButton menuButton = Toolkit::PushButton::New(); | 260 | Toolkit::PushButton menuButton = Toolkit::PushButton::New(); |
| 262 | menuButton.SetName( MENU_ITEMS[ i ].name ); | 261 | menuButton.SetName( MENU_ITEMS[ i ].name ); |
| 263 | menuButton.SetLabel( MENU_ITEMS[ i ].text ); | 262 | menuButton.SetLabel( MENU_ITEMS[ i ].text ); |
| 263 | + menuButton.SetButtonImage( Actor() ); | ||
| 264 | + menuButton.SetSelectedImage( Actor() ); | ||
| 264 | menuButton.ClickedSignal().Connect( this, &SizeNegotiationController::OnMenuSelect ); | 265 | menuButton.ClickedSignal().Connect( this, &SizeNegotiationController::OnMenuSelect ); |
| 265 | 266 | ||
| 266 | tableView.Add( menuButton ); | 267 | tableView.Add( menuButton ); |
| @@ -354,8 +355,6 @@ public: | @@ -354,8 +355,6 @@ public: | ||
| 354 | Toolkit::PushButton okayButton = Toolkit::PushButton::New(); | 355 | Toolkit::PushButton okayButton = Toolkit::PushButton::New(); |
| 355 | okayButton.SetName( OKAY_BUTTON_ID ); | 356 | okayButton.SetName( OKAY_BUTTON_ID ); |
| 356 | okayButton.SetLabel( "OK!" ); | 357 | okayButton.SetLabel( "OK!" ); |
| 357 | - okayButton.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); | ||
| 358 | - okayButton.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); | ||
| 359 | 358 | ||
| 360 | okayButton.ClickedSignal().Connect( this, &SizeNegotiationController::OnButtonClicked ); | 359 | okayButton.ClickedSignal().Connect( this, &SizeNegotiationController::OnButtonClicked ); |
| 361 | 360 | ||
| @@ -370,8 +369,6 @@ public: | @@ -370,8 +369,6 @@ public: | ||
| 370 | Toolkit::PushButton cancelButton = Toolkit::PushButton::New(); | 369 | Toolkit::PushButton cancelButton = Toolkit::PushButton::New(); |
| 371 | cancelButton.SetName( CANCEL_BUTTON_ID ); | 370 | cancelButton.SetName( CANCEL_BUTTON_ID ); |
| 372 | cancelButton.SetLabel( "Cancel" ); | 371 | cancelButton.SetLabel( "Cancel" ); |
| 373 | - cancelButton.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); | ||
| 374 | - cancelButton.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); | ||
| 375 | 372 | ||
| 376 | cancelButton.ClickedSignal().Connect( this, &SizeNegotiationController::OnButtonClicked ); | 373 | cancelButton.ClickedSignal().Connect( this, &SizeNegotiationController::OnButtonClicked ); |
| 377 | 374 | ||
| @@ -380,8 +377,6 @@ public: | @@ -380,8 +377,6 @@ public: | ||
| 380 | Toolkit::PushButton okayButton = Toolkit::PushButton::New(); | 377 | Toolkit::PushButton okayButton = Toolkit::PushButton::New(); |
| 381 | okayButton.SetName( OKAY_BUTTON_ID ); | 378 | okayButton.SetName( OKAY_BUTTON_ID ); |
| 382 | okayButton.SetLabel( "OK!" ); | 379 | okayButton.SetLabel( "OK!" ); |
| 383 | - okayButton.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); | ||
| 384 | - okayButton.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); | ||
| 385 | 380 | ||
| 386 | okayButton.ClickedSignal().Connect( this, &SizeNegotiationController::OnButtonClicked ); | 381 | okayButton.ClickedSignal().Connect( this, &SizeNegotiationController::OnButtonClicked ); |
| 387 | 382 | ||
| @@ -397,8 +392,6 @@ public: | @@ -397,8 +392,6 @@ public: | ||
| 397 | Toolkit::PushButton cancelButton = Toolkit::PushButton::New(); | 392 | Toolkit::PushButton cancelButton = Toolkit::PushButton::New(); |
| 398 | cancelButton.SetName( CANCEL_BUTTON_ID ); | 393 | cancelButton.SetName( CANCEL_BUTTON_ID ); |
| 399 | cancelButton.SetLabel( "Cancel" ); | 394 | cancelButton.SetLabel( "Cancel" ); |
| 400 | - cancelButton.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); | ||
| 401 | - cancelButton.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); | ||
| 402 | 395 | ||
| 403 | cancelButton.ClickedSignal().Connect( this, &SizeNegotiationController::OnButtonClicked ); | 396 | cancelButton.ClickedSignal().Connect( this, &SizeNegotiationController::OnButtonClicked ); |
| 404 | 397 | ||
| @@ -407,8 +400,6 @@ public: | @@ -407,8 +400,6 @@ public: | ||
| 407 | Toolkit::PushButton okayButton = Toolkit::PushButton::New(); | 400 | Toolkit::PushButton okayButton = Toolkit::PushButton::New(); |
| 408 | okayButton.SetName( OKAY_BUTTON_ID ); | 401 | okayButton.SetName( OKAY_BUTTON_ID ); |
| 409 | okayButton.SetLabel( "OK!" ); | 402 | okayButton.SetLabel( "OK!" ); |
| 410 | - okayButton.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); | ||
| 411 | - okayButton.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); | ||
| 412 | 403 | ||
| 413 | okayButton.ClickedSignal().Connect( this, &SizeNegotiationController::OnButtonClicked ); | 404 | okayButton.ClickedSignal().Connect( this, &SizeNegotiationController::OnButtonClicked ); |
| 414 | 405 | ||
| @@ -523,8 +514,6 @@ public: | @@ -523,8 +514,6 @@ public: | ||
| 523 | Toolkit::PushButton cancelButton = Toolkit::PushButton::New(); | 514 | Toolkit::PushButton cancelButton = Toolkit::PushButton::New(); |
| 524 | cancelButton.SetName( CANCEL_BUTTON_ID ); | 515 | cancelButton.SetName( CANCEL_BUTTON_ID ); |
| 525 | cancelButton.SetLabel( "Cancel" ); | 516 | cancelButton.SetLabel( "Cancel" ); |
| 526 | - cancelButton.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); | ||
| 527 | - cancelButton.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); | ||
| 528 | 517 | ||
| 529 | cancelButton.ClickedSignal().Connect( this, &SizeNegotiationController::OnButtonClicked ); | 518 | cancelButton.ClickedSignal().Connect( this, &SizeNegotiationController::OnButtonClicked ); |
| 530 | 519 | ||
| @@ -533,8 +522,6 @@ public: | @@ -533,8 +522,6 @@ public: | ||
| 533 | Toolkit::PushButton okayButton = Toolkit::PushButton::New(); | 522 | Toolkit::PushButton okayButton = Toolkit::PushButton::New(); |
| 534 | okayButton.SetName( OKAY_BUTTON_ID ); | 523 | okayButton.SetName( OKAY_BUTTON_ID ); |
| 535 | okayButton.SetLabel( "OK!" ); | 524 | okayButton.SetLabel( "OK!" ); |
| 536 | - okayButton.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); | ||
| 537 | - okayButton.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); | ||
| 538 | 525 | ||
| 539 | okayButton.ClickedSignal().Connect( this, &SizeNegotiationController::OnButtonClicked ); | 526 | okayButton.ClickedSignal().Connect( this, &SizeNegotiationController::OnButtonClicked ); |
| 540 | 527 | ||
| @@ -585,11 +572,7 @@ public: | @@ -585,11 +572,7 @@ public: | ||
| 585 | root.SetFitWidth( 0 ); | 572 | root.SetFitWidth( 0 ); |
| 586 | root.SetPadding( Padding( 0.0f, 0.0f, 0.0f, 20.0f ) ); | 573 | root.SetPadding( Padding( 0.0f, 0.0f, 0.0f, 20.0f ) ); |
| 587 | 574 | ||
| 588 | - Dali::Image unchecked = Dali::ResourceImage::New( CHECKBOX_UNCHECKED_IMAGE ); | ||
| 589 | - Dali::Image checked = Dali::ResourceImage::New( CHECKBOX_CHECKED_IMAGE ); | ||
| 590 | Toolkit::CheckBoxButton checkBox = Toolkit::CheckBoxButton::New(); | 575 | Toolkit::CheckBoxButton checkBox = Toolkit::CheckBoxButton::New(); |
| 591 | - checkBox.SetBackgroundImage( unchecked ); | ||
| 592 | - checkBox.SetSelectedImage( checked ); | ||
| 593 | checkBox.SetSize( 48, 48 ); | 576 | checkBox.SetSize( 48, 48 ); |
| 594 | 577 | ||
| 595 | root.AddChild( checkBox, Toolkit::TableView::CellPosition( 0, 0 ) ); | 578 | root.AddChild( checkBox, Toolkit::TableView::CellPosition( 0, 0 ) ); |
| @@ -609,8 +592,6 @@ public: | @@ -609,8 +592,6 @@ public: | ||
| 609 | Toolkit::PushButton cancelButton = Toolkit::PushButton::New(); | 592 | Toolkit::PushButton cancelButton = Toolkit::PushButton::New(); |
| 610 | cancelButton.SetName( CANCEL_BUTTON_ID ); | 593 | cancelButton.SetName( CANCEL_BUTTON_ID ); |
| 611 | cancelButton.SetLabel( "Cancel" ); | 594 | cancelButton.SetLabel( "Cancel" ); |
| 612 | - cancelButton.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); | ||
| 613 | - cancelButton.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); | ||
| 614 | 595 | ||
| 615 | cancelButton.ClickedSignal().Connect( this, &SizeNegotiationController::OnButtonClicked ); | 596 | cancelButton.ClickedSignal().Connect( this, &SizeNegotiationController::OnButtonClicked ); |
| 616 | 597 | ||
| @@ -619,8 +600,6 @@ public: | @@ -619,8 +600,6 @@ public: | ||
| 619 | Toolkit::PushButton okayButton = Toolkit::PushButton::New(); | 600 | Toolkit::PushButton okayButton = Toolkit::PushButton::New(); |
| 620 | okayButton.SetName( OKAY_BUTTON_ID ); | 601 | okayButton.SetName( OKAY_BUTTON_ID ); |
| 621 | okayButton.SetLabel( "OK!" ); | 602 | okayButton.SetLabel( "OK!" ); |
| 622 | - okayButton.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); | ||
| 623 | - okayButton.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); | ||
| 624 | 603 | ||
| 625 | okayButton.ClickedSignal().Connect( this, &SizeNegotiationController::OnButtonClicked ); | 604 | okayButton.ClickedSignal().Connect( this, &SizeNegotiationController::OnButtonClicked ); |
| 626 | 605 | ||
| @@ -1250,9 +1229,6 @@ public: // From ItemFactory | @@ -1250,9 +1229,6 @@ public: // From ItemFactory | ||
| 1250 | popupButton.SetLabel( buttonDataArray[ itemId ].text ); | 1229 | popupButton.SetLabel( buttonDataArray[ itemId ].text ); |
| 1251 | popupButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); | 1230 | popupButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); |
| 1252 | 1231 | ||
| 1253 | - popupButton.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) ); | ||
| 1254 | - popupButton.SetButtonImage( Dali::ResourceImage::New( PUSHBUTTON_BUTTON_IMAGE ) ); | ||
| 1255 | - | ||
| 1256 | popupButton.ClickedSignal().Connect( this, &SizeNegotiationController::OnButtonClicked ); | 1232 | popupButton.ClickedSignal().Connect( this, &SizeNegotiationController::OnButtonClicked ); |
| 1257 | 1233 | ||
| 1258 | return popupButton; | 1234 | return popupButton; |
examples/text-field/text-field-example.cpp
| @@ -86,6 +86,7 @@ public: | @@ -86,6 +86,7 @@ public: | ||
| 86 | ImageActor folderButton = ImageActor::New( image ); | 86 | ImageActor folderButton = ImageActor::New( image ); |
| 87 | folderButton.SetColor( Color::WHITE ); | 87 | folderButton.SetColor( Color::WHITE ); |
| 88 | button.SetButtonImage( folderButton ); | 88 | button.SetButtonImage( folderButton ); |
| 89 | + button.SetSelectedImage( Actor() ); | ||
| 89 | button.SetAnchorPoint( AnchorPoint::TOP_LEFT ); | 90 | button.SetAnchorPoint( AnchorPoint::TOP_LEFT ); |
| 90 | button.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); | 91 | button.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); |
| 91 | button.SetSize( image.GetWidth(), image.GetHeight() ); | 92 | button.SetSize( image.GetWidth(), image.GetHeight() ); |
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.0.47 | 5 | +Version: 1.0.48 |
| 6 | Release: 1 | 6 | Release: 1 |
| 7 | Group: System/Libraries | 7 | Group: System/Libraries |
| 8 | License: Apache-2.0 | 8 | License: Apache-2.0 |
resources/images/button-disabled.9.png deleted
852 Bytes
resources/images/button-down.9.png deleted
1.01 KB
resources/images/button-up.9.png deleted
1013 Bytes
resources/images/checkbox-selected.png deleted
1.94 KB
resources/images/checkbox-unselected.png deleted
629 Bytes
resources/images/icon-change-selected.png
0 → 100644
1.96 KB
resources/images/icon-cluster-carousel-selected.png
0 → 100644
1.69 KB
resources/images/icon-cluster-none-selected.png
0 → 100644
615 Bytes
resources/images/icon-cluster-sphere-selected.png
0 → 100644
1.91 KB
resources/images/icon-cluster-wobble-selected.png
0 → 100644
1.71 KB
resources/images/icon-delete-selected.png
0 → 100644
1 KB
resources/images/icon-edit-selected.png
0 → 100644
1.66 KB
resources/images/icon-effect-cross-selected.png
0 → 100644
838 Bytes
resources/images/icon-effect-fold-selected.png
0 → 100644
2.52 KB
resources/images/icon-effect-wave-selected.png
0 → 100644
2.2 KB
resources/images/icon-effects-off-selected.png
0 → 100644
941 Bytes
resources/images/icon-effects-on-selected.png
0 → 100644
1.3 KB
resources/images/icon-highp-selected.png
0 → 100644
1.14 KB
resources/images/icon-insert-selected.png
0 → 100644
1.08 KB
resources/images/icon-item-view-layout-depth-selected.png
0 → 100644
1.15 KB
resources/images/icon-item-view-layout-grid-selected.png
0 → 100644
1.08 KB
resources/images/icon-item-view-layout-spiral-selected.png
0 → 100644
2.02 KB
resources/images/icon-mediump-selected.png
0 → 100644
1.08 KB
resources/images/icon-play-selected.png
0 → 100644
1.81 KB
resources/images/icon-replace-selected.png
0 → 100644
1.35 KB
resources/images/icon-reset-selected.png
0 → 100644
2.02 KB
resources/images/icon-scroll-view-carousel-selected.png
0 → 100644
650 Bytes
resources/images/icon-scroll-view-depth-selected.png
0 → 100644
1.11 KB
resources/images/icon-scroll-view-inner-cube-selected.png
0 → 100644
1.12 KB
resources/images/icon-scroll-view-outer-cube-selected.png
0 → 100644
1.28 KB
resources/images/icon-scroll-view-spiral-selected.png
0 → 100644
1006 Bytes
resources/images/icon-stop-selected.png
0 → 100644
1.05 KB