projects
/
platform
/
core
/
uifw
/
dali-demo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changes after TouchedSignal changes
[platform/core/uifw/dali-demo.git]
/
examples
/
bezier-curve
/
bezier-curve-example.cpp
diff --git
a/examples/bezier-curve/bezier-curve-example.cpp
b/examples/bezier-curve/bezier-curve-example.cpp
index
38405af
..
07eb159
100644
(file)
--- a/
examples/bezier-curve/bezier-curve-example.cpp
+++ b/
examples/bezier-curve/bezier-curve-example.cpp
@@
-159,7
+159,7
@@
public:
mContentLayer = Layer::New();
mContentLayer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
mContentLayer = Layer::New();
mContentLayer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
- mContentLayer.TouchSignal().Connect(this, &BezierCurveExample::OnTouchLayer);
+ mContentLayer.Touch
ed
Signal().Connect(this, &BezierCurveExample::OnTouchLayer);
mContentLayer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
window.Add( mContentLayer );
mContentLayer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
window.Add( mContentLayer );
@@
-300,7
+300,7
@@
public:
Property::Map curveVertexFormat;
curveVertexFormat["aPosition"] = Property::VECTOR2;
Property::Map curveVertexFormat;
curveVertexFormat["aPosition"] = Property::VECTOR2;
- mCurveVertices =
Property
Buffer::New( curveVertexFormat );
+ mCurveVertices =
Vertex
Buffer::New( curveVertexFormat );
Vector2 vertexData[2] = { Vector2(-0.5f, 0.5f), Vector2( 0.5f, -0.5f ) };
mCurveVertices.SetData( vertexData, 2 );
Vector2 vertexData[2] = { Vector2(-0.5f, 0.5f), Vector2( 0.5f, -0.5f ) };
mCurveVertices.SetData( vertexData, 2 );
@@
-330,11
+330,11
@@
public:
constraint.AddSource( Source( parent, Actor::Property::SIZE ) );
constraint.Apply();
constraint.AddSource( Source( parent, Actor::Property::SIZE ) );
constraint.Apply();
- actor.TouchSignal().Connect(this, &BezierCurveExample::OnTouchControlPoint);
+ actor.Touch
ed
Signal().Connect(this, &BezierCurveExample::OnTouchControlPoint);
return actor;
}
return actor;
}
- Actor CreateControlLine(
Property
Buffer vertexBuffer )
+ Actor CreateControlLine(
Vertex
Buffer vertexBuffer )
{
Actor line = Actor::New();
line.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
{
Actor line = Actor::New();
line.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
@@
-364,8
+364,8
@@
public:
Property::Map lineVertexFormat;
lineVertexFormat["aPosition"] = Property::VECTOR2;
Property::Map lineVertexFormat;
lineVertexFormat["aPosition"] = Property::VECTOR2;
- mLine1Vertices =
Property
Buffer::New( lineVertexFormat );
- mLine2Vertices =
Property
Buffer::New( lineVertexFormat );
+ mLine1Vertices =
Vertex
Buffer::New( lineVertexFormat );
+ mLine2Vertices =
Vertex
Buffer::New( lineVertexFormat );
mControlLine1 = CreateControlLine( mLine1Vertices );
mControlLine2 = CreateControlLine( mLine2Vertices );
mControlLine1 = CreateControlLine( mLine1Vertices );
mControlLine2 = CreateControlLine( mLine2Vertices );
@@
-492,7
+492,7
@@
public:
}
}
}
}
- bool OnTouchControlPoint( Actor controlPoint, const Touch
Data
& event )
+ bool OnTouchControlPoint( Actor controlPoint, const Touch
Event
& event )
{
if( event.GetPointCount() > 0 )
{
{
if( event.GetPointCount() > 0 )
{
@@
-510,7
+510,7
@@
public:
return false; // Don't mark this as consumed - let the layer get the touch
}
return false; // Don't mark this as consumed - let the layer get the touch
}
- bool OnTouchLayer( Actor actor, const Touch
Data
& event )
+ bool OnTouchLayer( Actor actor, const Touch
Event
& event )
{
if( event.GetPointCount() > 0 )
{
{
if( event.GetPointCount() > 0 )
{
@@
-573,7
+573,7
@@
public:
void OnKeyEvent(const KeyEvent& event)
{
void OnKeyEvent(const KeyEvent& event)
{
- if( event.
state == KeyEvent::Down
&& (IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK )) )
+ if( event.
GetState() == KeyEvent::DOWN
&& (IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK )) )
{
mApplication.Quit();
}
{
mApplication.Quit();
}
@@
-595,9
+595,9
@@
private:
Timer mTimer;
Animation mDragAnimation;
Animation mBezierAnimation;
Timer mTimer;
Animation mDragAnimation;
Animation mBezierAnimation;
-
Property
Buffer mCurveVertices;
-
Property
Buffer mLine1Vertices;
-
Property
Buffer mLine2Vertices;
+
Vertex
Buffer mCurveVertices;
+
Vertex
Buffer mLine1Vertices;
+
Vertex
Buffer mLine2Vertices;
Vector2 mRelativeDragPoint;
Vector2 mLastControlPointPosition1;
Vector2 mLastControlPointPosition2;
Vector2 mRelativeDragPoint;
Vector2 mLastControlPointPosition1;
Vector2 mLastControlPointPosition2;