コード例 #1
0
bool HitTest( Stage& stage, const Vector2& screenCoordinates, Results& results, HitTestInterface& hitTestInterface )
{
  bool wasHit( false );

  // Hit-test the system-overlay actors first
  SystemOverlay* systemOverlay = stage.GetSystemOverlayInternal();

  if ( systemOverlay )
  {
    RenderTaskList& overlayTaskList = systemOverlay->GetOverlayRenderTasks();
    LayerList& overlayLayerList = systemOverlay->GetLayerList();

    wasHit = HitTestForEachRenderTask( stage, overlayLayerList, overlayTaskList, screenCoordinates, results, hitTestInterface );
  }

  // Hit-test the regular on-stage actors
  if ( !wasHit )
  {
    RenderTaskList& taskList = stage.GetRenderTaskList();
    LayerList& layerList = stage.GetLayerList();

    wasHit = HitTestForEachRenderTask( stage, layerList, taskList, screenCoordinates, results, hitTestInterface );
  }
  return wasHit;
}
コード例 #2
0
bool HitTest( Stage& stage, RenderTask& renderTask, const Vector2& screenCoordinates,
              Dali::HitTestAlgorithm::Results& results, Dali::HitTestAlgorithm::HitTestFunction func )
{
  bool wasHit( false );
  Results hitTestResults;

  const Vector< RenderTaskList::Exclusive >& exclusives = stage.GetRenderTaskList().GetExclusivesList();
  HitTestFunctionWrapper hitTestFunctionWrapper( func );
  if ( HitTestRenderTask( exclusives, stage, stage.GetLayerList(), renderTask, screenCoordinates, hitTestResults, hitTestFunctionWrapper ) )
  {
    results.actor = hitTestResults.actor;
    results.actorCoordinates = hitTestResults.actorCoordinates;
    wasHit = true;
  }
  return wasHit;
}
コード例 #3
0
bool HitTest( Stage& stage, const Vector2& screenCoordinates, Dali::HitTestAlgorithm::Results& results, Dali::HitTestAlgorithm::HitTestFunction func )
{
  bool wasHit( false );
  // Hit-test the regular on-stage actors
  RenderTaskList& taskList = stage.GetRenderTaskList();
  LayerList& layerList = stage.GetLayerList();

  Results hitTestResults;
  HitTestFunctionWrapper hitTestFunctionWrapper( func );
  if (  HitTestForEachRenderTask( stage, layerList, taskList, screenCoordinates, hitTestResults, hitTestFunctionWrapper ) )
  {
    results.actor = hitTestResults.actor;
    results.actorCoordinates = hitTestResults.actorCoordinates;
    wasHit = true;
  }
  return wasHit;
}