if ( !mDoubleTapDetector )
{
- mDoubleTapDetector = TapGestureDetector::New();
- mDoubleTapDetector.SetTapsRequired( 2 );
+ mDoubleTapDetector = TapGestureDetector::New( 2 );
mDoubleTapDetector.DetectedSignal().Connect(this, &TextInput::OnDoubleTap);
// Only attach and detach the actor to the double tap detector when we enter/leave edit mode
Vector3 handlesize = GetSelectionHandleSize();
// Exceeding horizontal boundary
- PropertyNotification leftNotification = mSelectionHandleOne.AddPropertyNotification( Actor::WORLD_POSITION_X, LessThanCondition( mBoundingRectangleWorldCoordinates.x + handlesize.x) );
+ PropertyNotification leftNotification = mSelectionHandleOne.AddPropertyNotification( Actor::Property::WorldPositionX, LessThanCondition( mBoundingRectangleWorldCoordinates.x + handlesize.x) );
leftNotification.NotifySignal().Connect( this, &TextInput::OnLeftBoundaryExceeded );
- PropertyNotification rightNotification = mSelectionHandleTwo.AddPropertyNotification( Actor::WORLD_POSITION_X, GreaterThanCondition( mBoundingRectangleWorldCoordinates.z - handlesize.x ) );
+ PropertyNotification rightNotification = mSelectionHandleTwo.AddPropertyNotification( Actor::Property::WorldPositionX, GreaterThanCondition( mBoundingRectangleWorldCoordinates.z - handlesize.x ) );
rightNotification.NotifySignal().Connect( this, &TextInput::OnRightBoundaryExceeded );
// Within horizontal boundary
- PropertyNotification leftLeaveNotification = mSelectionHandleOne.AddPropertyNotification( Actor::WORLD_POSITION_X, GreaterThanCondition( mBoundingRectangleWorldCoordinates.x + 2*handlesize.x ) );
+ PropertyNotification leftLeaveNotification = mSelectionHandleOne.AddPropertyNotification( Actor::Property::WorldPositionX, GreaterThanCondition( mBoundingRectangleWorldCoordinates.x + 2*handlesize.x ) );
leftLeaveNotification.NotifySignal().Connect( this, &TextInput::OnReturnToLeftBoundary );
- PropertyNotification rightLeaveNotification = mSelectionHandleTwo.AddPropertyNotification( Actor::WORLD_POSITION_X, LessThanCondition( mBoundingRectangleWorldCoordinates.z - 2*handlesize.x ) );
+ PropertyNotification rightLeaveNotification = mSelectionHandleTwo.AddPropertyNotification( Actor::Property::WorldPositionX, LessThanCondition( mBoundingRectangleWorldCoordinates.z - 2*handlesize.x ) );
rightLeaveNotification.NotifySignal().Connect( this, &TextInput::OnReturnToRightBoundary );
// Exceeding vertical boundary
- PropertyNotification verticalExceedNotificationOne = mSelectionHandleOne.AddPropertyNotification( Actor::WORLD_POSITION_Y,
+ PropertyNotification verticalExceedNotificationOne = mSelectionHandleOne.AddPropertyNotification( Actor::Property::WorldPositionY,
OutsideCondition( mBoundingRectangleWorldCoordinates.y + handlesize.y,
mBoundingRectangleWorldCoordinates.w - handlesize.y ) );
verticalExceedNotificationOne.NotifySignal().Connect( this, &TextInput::OnHandleOneLeavesBoundary );
- PropertyNotification verticalExceedNotificationTwo = mSelectionHandleTwo.AddPropertyNotification( Actor::WORLD_POSITION_Y,
+ PropertyNotification verticalExceedNotificationTwo = mSelectionHandleTwo.AddPropertyNotification( Actor::Property::WorldPositionY,
OutsideCondition( mBoundingRectangleWorldCoordinates.y + handlesize.y,
mBoundingRectangleWorldCoordinates.w - handlesize.y ) );
verticalExceedNotificationTwo.NotifySignal().Connect( this, &TextInput::OnHandleTwoLeavesBoundary );
// Within vertical boundary
- PropertyNotification verticalWithinNotificationOne = mSelectionHandleOne.AddPropertyNotification( Actor::WORLD_POSITION_Y,
+ PropertyNotification verticalWithinNotificationOne = mSelectionHandleOne.AddPropertyNotification( Actor::Property::WorldPositionY,
InsideCondition( mBoundingRectangleWorldCoordinates.y + handlesize.y,
mBoundingRectangleWorldCoordinates.w - handlesize.y ) );
verticalWithinNotificationOne.NotifySignal().Connect( this, &TextInput::OnHandleOneWithinBoundary );
- PropertyNotification verticalWithinNotificationTwo = mSelectionHandleTwo.AddPropertyNotification( Actor::WORLD_POSITION_Y,
+ PropertyNotification verticalWithinNotificationTwo = mSelectionHandleTwo.AddPropertyNotification( Actor::Property::WorldPositionY,
InsideCondition( mBoundingRectangleWorldCoordinates.y + handlesize.y,
mBoundingRectangleWorldCoordinates.w - handlesize.y ) );
verticalWithinNotificationTwo.NotifySignal().Connect( this, &TextInput::OnHandleTwoWithinBoundary );
mHighlightMeshActor.SetParentOrigin( ParentOrigin::TOP_LEFT );
mHighlightMeshActor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
mHighlightMeshActor.SetPosition( 0.0f, 0.0f, DISPLAYED_HIGHLIGHT_Z_OFFSET );
- mHighlightMeshActor.SetAffectedByLighting(false);
Self().Add(mHighlightMeshActor);
}