Change-Id: Ie4fab2a634ccd47f655a99680a97aa057bcf6578
else
{
// Otherwise it will blend between fully opaque and transparent
else
{
// Otherwise it will blend between fully opaque and transparent
- current.a = ( 100.0f - mDistance ) / 100.0f;
+ current.a = ( mDistance - distance ) / mDistance;
int main (int argc, char **argv)
{
int main (int argc, char **argv)
{
- Dali::Application app = Application::New(argc, argv);
- app.SignalInit().Connect(&CreateProgram);
+ Dali::Application app = Application::New(&argc, &argv);
+ app.InitSignal().Connect(&CreateProgram);
app.MainLoop();
}
@endcode
app.MainLoop();
}
@endcode
// Elsewhere
Dali::Timer timer = Dali::Timer::New(2000); // 2 second timeout
// Elsewhere
Dali::Timer timer = Dali::Timer::New(2000); // 2 second timeout
-timer.SignalTick().Connect(&Tick);
+timer.TickSignal().Connect(&Tick);
|:----------------------|:--------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------:|
| Default | Properties defined within DALi Core, e.g. Dali::Actor, Dali::ShaderEffect default properties etc. | \link Dali::DEFAULT_OBJECT_PROPERTY_START_INDEX DEFAULT_OBJECT_PROPERTY_START_INDEX\endlink | \link Dali::DEFAULT_PROPERTY_MAX_COUNT DEFAULT_PROPERTY_MAX_COUNT\endlink (9999999) |
| Registered | Properties registered using Dali::PropertyRegistration | \link Dali::PROPERTY_REGISTRATION_START_INDEX PROPERTY_REGISTRATION_START_INDEX\endlink (10000000) | \link Dali::PROPERTY_REGISTRATION_MAX_INDEX PROPERTY_REGISTRATION_MAX_INDEX\endlink (19999999) |
|:----------------------|:--------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------:|
| Default | Properties defined within DALi Core, e.g. Dali::Actor, Dali::ShaderEffect default properties etc. | \link Dali::DEFAULT_OBJECT_PROPERTY_START_INDEX DEFAULT_OBJECT_PROPERTY_START_INDEX\endlink | \link Dali::DEFAULT_PROPERTY_MAX_COUNT DEFAULT_PROPERTY_MAX_COUNT\endlink (9999999) |
| Registered | Properties registered using Dali::PropertyRegistration | \link Dali::PROPERTY_REGISTRATION_START_INDEX PROPERTY_REGISTRATION_START_INDEX\endlink (10000000) | \link Dali::PROPERTY_REGISTRATION_MAX_INDEX PROPERTY_REGISTRATION_MAX_INDEX\endlink (19999999) |
-| Registered Animatable | Animatable properties registered using Dali::AnimatablePropertyRegistration | \link Dali::ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX\endlink (20000000) | \link Dali::ANIMATABLE_PROPERTY_REGISTRATION_MAX_INDEX ANIMATABLE_PROPERTY_REGISTRATION_MAX_INDEX\endlink (29999999) |
-| Registered Child | Child properties (which parent supports in its children) registered using Dali::ChildPropertyRegistration | \link Dali::ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX\endlink (20000000) | \link Dali::CHILD_PROPERTY_REGISTRATION_MAX_INDEX CHILD_PROPERTY_REGISTRATION_MAX_INDEX\endlink (49999999) |
| Control | Property range reserved by Dali::Toolkit::Control | \link Dali::Toolkit::Control::CONTROL_PROPERTY_START_INDEX CONTROL_PROPERTY_START_INDEX\endlink (10000000) | \link Dali::Toolkit::Control::CONTROL_PROPERTY_END_INDEX CONTROL_PROPERTY_END_INDEX\endlink (10001000) |
| Derived Control | Property range for control deriving directly from Dali::Toolkit::Control | 10001001 | \link Dali::PROPERTY_REGISTRATION_MAX_INDEX PROPERTY_REGISTRATION_MAX_INDEX\endlink (19999999) |
| Control | Property range reserved by Dali::Toolkit::Control | \link Dali::Toolkit::Control::CONTROL_PROPERTY_START_INDEX CONTROL_PROPERTY_START_INDEX\endlink (10000000) | \link Dali::Toolkit::Control::CONTROL_PROPERTY_END_INDEX CONTROL_PROPERTY_END_INDEX\endlink (10001000) |
| Derived Control | Property range for control deriving directly from Dali::Toolkit::Control | 10001001 | \link Dali::PROPERTY_REGISTRATION_MAX_INDEX PROPERTY_REGISTRATION_MAX_INDEX\endlink (19999999) |
+| Registered Animatable | Animatable properties registered using Dali::AnimatablePropertyRegistration | \link Dali::ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX\endlink (20000000) | \link Dali::ANIMATABLE_PROPERTY_REGISTRATION_MAX_INDEX ANIMATABLE_PROPERTY_REGISTRATION_MAX_INDEX\endlink (29999999) |
+| Registered Child | Child properties (which parent supports in its children) registered using Dali::ChildPropertyRegistration | \link Dali::CHILD_PROPERTY_REGISTRATION_START_INDEX CHILD_PROPERTY_REGISTRATION_START_INDEX\endlink (45000000) | \link Dali::CHILD_PROPERTY_REGISTRATION_MAX_INDEX CHILD_PROPERTY_REGISTRATION_MAX_INDEX\endlink (49999999) |
| Custom | Custom properties added to instance using Dali::Handle::RegisterProperty | \link Dali::PROPERTY_CUSTOM_START_INDEX PROPERTY_CUSTOM_START_INDEX\endlink (50000000) | Onwards... |
<br>
| Custom | Custom properties added to instance using Dali::Handle::RegisterProperty | \link Dali::PROPERTY_CUSTOM_START_INDEX PROPERTY_CUSTOM_START_INDEX\endlink (50000000) | Onwards... |
<br>
@clip{"properties.cpp", // C++ EXAMPLE, // C++ EXAMPLE END}
@clip{"properties.cpp", // C++ EXAMPLE, // C++ EXAMPLE END}
-Once run, a grid of buttons will appear. When a button is pressed, the unique number stored in the property (in this case the index) is displayed at the bottom of the screen.
-
<br>
<hr>
@section property-use-example-js Property use in JavaScript
<br>
<hr>
@section property-use-example-js Property use in JavaScript
std::cout << "Animation has finished" << std::endl;
}
...
std::cout << "Animation has finished" << std::endl;
}
...
-animation.FinishedSignal().Connect( ExampleCallback );
+animation.FinishedSignal().Connect( &ExampleCallback );
## Positioning Actors {#positioning-actors}
An actor inherits its parent's position. The relative position between the actor & parent is determined by 3 properties:
## Positioning Actors {#positioning-actors}
An actor inherits its parent's position. The relative position between the actor & parent is determined by 3 properties:
1) ParentOrigin. This Vector3 property defines a point within the parent actor's area.
![ ](../assets/img/parent-origin.png)
1) ParentOrigin. This Vector3 property defines a point within the parent actor's area.
![ ](../assets/img/parent-origin.png)
![ ](../assets/img/actor-position.png)
![ ](actor-position.png)
![ ](../assets/img/actor-position.png)
![ ](actor-position.png)
-Therefore by default, an actors position is the distance between its center and the top-left corner of its parent.
+The default is (X = 0, Y = 0), so an actor placed directly without modifying the parent origin, anchor point or position would appear centred around the top left corner of its parent.
-An actor added directly to the stage with position (X = stageWidth*0.5, Y = stageHeight*0.5), would appear in the center of the screen. Likewise an actor with position (X = actorWidth*0.5, Y = actorWidth*0.5), would appear at the top-left of the screen.
+An actor added directly to the stage with position (X = stageWidth*0.5, Y = stageHeight*0.5), would appear in the center of the screen. Likewise an actor with position (X = actorWidth*0.5, Y = actorWidth*0.5), would appear at the top-left of the screen. However, basic positioning like that is normally done via changing the parent origin and/or anchor point instead - use ParentOrigin::CENTER and AnchorPoint::CENTER to place the actor in the center of the screen, and ParentOrigin::TOP_LEFT and AnchorPoint::TOP_LEFT to place it inside the screen on the top left.
Note that since DALi is a 3D toolkit, this behaviour is the result of a default perspective camera setup.
Note that since DALi is a 3D toolkit, this behaviour is the result of a default perspective camera setup.