[Tizen] Send the position of the focused actor 13/258313/1
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Thu, 13 May 2021 08:42:03 +0000 (17:42 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Thu, 13 May 2021 08:44:01 +0000 (17:44 +0900)
- Set the current position of the focused actor.
- The position is based on how far away it is from the top-left of window.

Change-Id: Ib614f8df883d80e53dc731d1b8c2b1fda107b1df
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
dali-toolkit/internal/accessibility-manager/accessibility-manager-impl.cpp

index 9500a4d..faab637 100644 (file)
@@ -360,6 +360,12 @@ bool AccessibilityManager::DoSetCurrentFocusActor(const unsigned int actorID)
         actor.Add( GetFocusIndicatorActor() );
       }
 
+      // Send Focused actor information
+      Vector2 windowSize = rootActor.GetCurrentProperty<Vector2>(Actor::Property::SIZE);
+      AccessibilityAdaptor adaptor = AccessibilityAdaptor::Get();
+      adaptor.SetFocusActorPosition( Vector2((actor.GetCurrentProperty<Vector3>(Actor::Property::WORLD_POSITION).x + (windowSize.width / 2)),
+                                             (actor.GetCurrentProperty<Vector3>(Actor::Property::WORLD_POSITION).y + (windowSize.height / 2))) );
+
       // Send notification for the change of focus actor
       mFocusChangedSignal.Emit( GetCurrentFocusActor(), actor );