{\r
namespace\r
{\r
+static constexpr float FULLY_TRANSPARENT(0.01f); ///< Alpha values must rise above this, before an object is considered to be visible.\r
+\r
static int MajorAxisDistanceRaw(Dali::Toolkit::Control::KeyboardFocus::Direction direction, Dali::Rect<float> source, Dali::Rect<float> dest)\r
{\r
switch(direction)\r
MinorAxisDistance(direction, focusedRect, bestCandidateRect)));\r
}\r
\r
+bool IsFocusable(Actor& actor)\r
+{\r
+ return (actor.GetProperty<bool>(Actor::Property::KEYBOARD_FOCUSABLE) &&\r
+ actor.GetProperty<bool>(Actor::Property::VISIBLE) &&\r
+ actor.GetProperty<bool>(Actor::Property::SENSITIVE) &&\r
+ actor.GetProperty<Vector4>(Actor::Property::WORLD_COLOR).a > FULLY_TRANSPARENT);\r
+}\r
+\r
Actor FindNextFocus(Actor& actor, Actor& focusedActor, Rect<float>& focusedRect, Rect<float>& bestCandidateRect, Toolkit::Control::KeyboardFocus::Direction direction)\r
{\r
Actor nearestActor;\r
for(auto i = 0u; i < childCount; ++i)\r
{\r
Dali::Actor child = actor.GetChildAt(i);\r
- if(child && child != focusedActor && child.GetProperty<bool>(Actor::Property::KEYBOARD_FOCUSABLE))\r
+ if(child && child != focusedActor && IsFocusable(child))\r
{\r
Rect<float> candidateRect = DevelActor::CalculateScreenExtents(child);\r
\r