X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=examples%2Fcube-transition-effect%2Fcube-transition-effect-example.cpp;h=59a8e0f44e9f30a27830896b7292654dd7b1f16b;hb=b26d446b0cb6a316abc3a79d4fc70d0ae1b7994c;hp=08f0228e437b5b4134e9731795f832c4041315ed;hpb=694dced621016315f10a5bdbd3f4552f5e29e380;p=platform%2Fcore%2Fuifw%2Fdali-demo.git diff --git a/examples/cube-transition-effect/cube-transition-effect-example.cpp b/examples/cube-transition-effect/cube-transition-effect-example.cpp old mode 100644 new mode 100755 index 08f0228..59a8e0f --- a/examples/cube-transition-effect/cube-transition-effect-example.cpp +++ b/examples/cube-transition-effect/cube-transition-effect-example.cpp @@ -227,18 +227,18 @@ void CubeTransitionApp::OnInit( Application& application ) ); effectChangeToggleButton.ClickedSignal().Connect( this, &CubeTransitionApp::OnEffectButtonClicked ); - mToolBar.AddControl( effectChangeToggleButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); + mToolBar.AddControl( effectChangeToggleButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HORIZONTAL_RIGHT, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); // Add title to the tool bar. mTitle = DemoHelper::CreateToolBarLabel( APPLICATION_TITLE_WAVE ); - mToolBar.AddControl( mTitle, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarTitlePercentage, Toolkit::Alignment::HorizontalCenter ); + mToolBar.AddControl( mTitle, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarTitlePercentage, Toolkit::Alignment::HORIZONTAL_CENTER ); //Add an slideshow icon on the right of the title mSlideshowButton = Toolkit::PushButton::New(); mSlideshowButton.SetProperty( Toolkit::Button::Property::UNSELECTED_BACKGROUND_VISUAL, SLIDE_SHOW_START_ICON ); mSlideshowButton.SetProperty( Toolkit::Button::Property::SELECTED_BACKGROUND_VISUAL, SLIDE_SHOW_START_ICON_SELECTED ); mSlideshowButton.ClickedSignal().Connect( this, &CubeTransitionApp::OnSildeshowButtonClicked ); - mToolBar.AddControl( mSlideshowButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalCenter, DemoHelper::DEFAULT_PLAY_PADDING ); + mToolBar.AddControl( mSlideshowButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HORIZONTAL_CENTER, DemoHelper::DEFAULT_PLAY_PADDING ); // Set size to window size to avoid seeing a black border on transition mViewSize = application.GetWindow().GetSize(); @@ -296,9 +296,10 @@ void CubeTransitionApp::OnPanGesture( Actor actor, const PanGesture& gesture ) return; } - if( gesture.state == Gesture::Continuing ) + if( gesture.GetState() == GestureState::CONTINUING ) { - if( gesture.displacement.x < 0) + const Vector2& displacement = gesture.GetDisplacement(); + if( displacement.x < 0) { mIndex = (mIndex + 1)%NUM_IMAGES; } @@ -307,8 +308,8 @@ void CubeTransitionApp::OnPanGesture( Actor actor, const PanGesture& gesture ) mIndex = (mIndex + NUM_IMAGES -1)%NUM_IMAGES; } - mPanPosition = gesture.position; - mPanDisplacement = gesture.displacement; + mPanPosition = gesture.GetPosition(); + mPanDisplacement = displacement; GoToNextImage(); } } @@ -403,7 +404,7 @@ Texture CubeTransitionApp::LoadWindowFillingTexture( const char* filepath ) void CubeTransitionApp::OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::DOWN) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) {