mScrollView.SetAxisAutoLock( true );
mScrollView.ScrollCompletedSignal().Connect( this, &DaliTableView::OnScrollComplete );
mScrollView.ScrollStartedSignal().Connect( this, &DaliTableView::OnScrollStart );
- mScrollView.TouchedSignal().Connect( this, &DaliTableView::OnScrollTouched );
+ mScrollView.TouchSignal().Connect( this, &DaliTableView::OnScrollTouched );
mScrollViewLayer = Layer::New();
content.SetKeyboardFocusable(true);
// connect to the touch events
- content.TouchedSignal().Connect( this, &DaliTableView::OnTilePressed );
+ content.TouchSignal().Connect( this, &DaliTableView::OnTilePressed );
content.HoveredSignal().Connect( this, &DaliTableView::OnTileHovered );
return content;
Toolkit::ImageView DaliTableView::NewStencilImage()
{
Toolkit::ImageView stencil = ImageView::New( TILE_BACKGROUND_ALPHA );
-
stencil.SetParentOrigin( ParentOrigin::CENTER );
stencil.SetAnchorPoint( AnchorPoint::CENTER );
stencil.SetDrawMode( DrawMode::STENCIL );
return stencil;
}
-bool DaliTableView::OnTilePressed( Actor actor, const TouchEvent& event )
+bool DaliTableView::OnTilePressed( Actor actor, const TouchData& event )
+{
+ return DoTilePress( actor, event.GetState( 0 ) );
+}
+
+bool DaliTableView::DoTilePress( Actor actor, PointState::Type pointState )
{
bool consumed = false;
- const TouchPoint& point = event.GetPoint( 0 );
- if( TouchPoint::Down == point.state )
+ if( PointState::DOWN == pointState )
{
mPressedActor = actor;
consumed = true;
// A button press is only valid if the Down & Up events
// both occurred within the button.
- if( ( TouchPoint::Up == point.state ) &&
+ if( ( PointState::UP == pointState ) &&
( mPressedActor == actor ) )
{
// ignore Example button presses when scrolling or button animating.
accessibilityManager.SetCurrentFocusActor(mPages[mScrollView.GetCurrentPage()].GetChildAt(0) );
}
-bool DaliTableView::OnScrollTouched( Actor actor, const TouchEvent& event )
+bool DaliTableView::OnScrollTouched( Actor actor, const TouchData& event )
{
- const TouchPoint& point = event.GetPoint( 0 );
- if( TouchPoint::Down == point.state )
+ if( PointState::DOWN == event.GetState( 0 ) )
{
mPressedActor = actor;
}
Dali::Property::Map effect = Toolkit::CreateDistanceFieldEffect();
dfActor.SetProperty( Toolkit::ImageView::Property::IMAGE, effect );
dfActor.SetColor( BUBBLE_COLOR[ i%NUMBER_OF_BUBBLE_COLOR ] );
+
layer.Add( dfActor );
}
ImageView DaliTableView::CreateLogo( std::string imagePath )
{
- Image image = ResourceImage::New( imagePath );
- ImageView logo = ImageView::New( image );
+ ImageView logo = ImageView::New( imagePath );
logo.SetAnchorPoint( AnchorPoint::CENTER );
logo.SetParentOrigin( ParentOrigin::CENTER );
mPressedActor = activatedActor;
// Activate the current focused actor;
- TouchEvent touchEventUp;
- touchEventUp.points.push_back( TouchPoint ( 0, TouchPoint::Up, 0.0f, 0.0f ) );
- OnTilePressed(mPressedActor, touchEventUp);
+ DoTilePress( mPressedActor, PointState::UP );
}
}