Class MarkerHoverLabel
- Namespace
- LansMap.Markers.Interaction
[DefaultExecutionOrder(150)]
public sealed class MarkerHoverLabel : MonoBehaviour
- Inheritance
-
objectObjectComponentBehaviourMonoBehaviourMarkerHoverLabel
Fields
DefaultBackground
[Tooltip("Default tooltip background color.")]
public Color DefaultBackground
Field Value
- Color
DefaultFontSize
[Tooltip("Default tooltip font size.")]
public int DefaultFontSize
Field Value
DefaultTextColor
[Tooltip("Default tooltip text color.")]
public Color DefaultTextColor
Field Value
- Color
DrawDefaultTooltip
[Tooltip("Disable to render your own tooltip from the Hovered id.")]
public bool DrawDefaultTooltip
Field Value
FontOverride
[Tooltip("Tooltip font override; empty = the map's global LabelFont.")]
public Font FontOverride
Field Value
- Font
Map
[Tooltip("Map whose markers are hover-tested. Works against either ScreenMapView or SurfaceMapView.")]
public BaseMapView Map
Field Value
PickRadiusPx
[Tooltip("Pick radius around the cursor in screen pixels.")]
public float PickRadiusPx
Field Value
Pointer
[NonSerialized]
public IMapPointerSurface Pointer
Field Value
Prefabs
[Tooltip("Prefab-tier manager to hover with the bulk layer. Empty uses one on this GameObject.")]
public WorldMarkerManager Prefabs
Field Value
Tabletop
[Tooltip("Tabletop to hover floating markers on. Empty uses Pointer when it is a table.")]
public TabletopContentView Tabletop
Field Value
Properties
Hovered
public int Hovered { get; }
Property Value
HoveredRef
Cross-tier hover target. None when nothing is hovered.
public MarkerRef HoveredRef { get; }
Property Value
Methods
NeedsRepick(Vector3, Vector3, MapViewTransform, MapViewTransform, bool)
public static bool NeedsRepick(Vector3 mouse, Vector3 lastMouse, MapViewTransform view, MapViewTransform lastView, bool hasLastView)
Parameters
mouseVector3lastMouseVector3viewMapViewTransformlastViewMapViewTransformhasLastViewbool
Returns
TryHoverPick(BaseMapView, WorldMarkerManager, TabletopContentView, MapViewTransform, ScreenPoint, double, out MarkerRef, out double)
Screen maps use CrossTierPicker. A table tries floating markers first, then painted bulk.
public static bool TryHoverPick(BaseMapView map, WorldMarkerManager prefabs, TabletopContentView tabletop, MapViewTransform view, ScreenPoint cursor, double radiusPx, out MarkerRef hit, out double distanceSq)
Parameters
mapBaseMapViewprefabsWorldMarkerManagertabletopTabletopContentViewviewMapViewTransformcursorScreenPointradiusPxdoublehitMarkerRefdistanceSqdouble