/// <summary> /// Checks if the marker in the specified screen coordinates, and shows him a tooltip. /// </summary> /// <param name="screenPosition">Screen coordinates</param> public void ShowMarkersTooltip(Vector2 screenPosition) { if (showMarkerTooltip != OnlineMapsShowMarkerTooltip.onPress) { tooltip = string.Empty; tooltipDrawingElement = null; tooltipMarker = null; } if (control is OnlineMapsControlBase3D && OnlineMapsControlBase3D.instance.marker2DMode == OnlineMapsMarker2DMode.billboard) { return; } OnlineMapsMarker marker = GetMarkerFromScreen(screenPosition); if (showMarkerTooltip == OnlineMapsShowMarkerTooltip.onHover) { if (marker != null) { tooltip = marker.label; tooltipMarker = marker; } else { OnlineMapsDrawingElement drawingElement = GetDrawingElement(screenPosition); if (drawingElement != null) { tooltip = drawingElement.tooltip; tooltipDrawingElement = drawingElement; } } } if (rolledMarker != marker) { if (rolledMarker != null && rolledMarker.OnRollOut != null) rolledMarker.OnRollOut(rolledMarker); rolledMarker = marker; if (rolledMarker != null && rolledMarker.OnRollOver != null) rolledMarker.OnRollOver(rolledMarker); } }
/// <summary> /// Checks if the marker in the specified screen coordinates, and shows him a tooltip. /// </summary> /// <param name="screenPosition">Screen coordinates</param> public void ShowMarkersTooltip(Vector2 screenPosition) { tooltip = string.Empty; tooltipMarker = null; OnlineMapsMarker marker = GetMarkerFromScreen(screenPosition); if (showMarkerTooltip == OnlineMapsShowMarkerTooltip.onHover && marker != null) { tooltip = marker.label; tooltipMarker = marker; } if (rolledMarker != marker) { if (rolledMarker != null && rolledMarker.OnRollOut != null) rolledMarker.OnRollOut(rolledMarker); rolledMarker = marker; if (rolledMarker != null && rolledMarker.OnRollOver != null) rolledMarker.OnRollOver(rolledMarker); } }