Table of Contents

Class MarkerHoverLabel

[DefaultExecutionOrder(150)]
public sealed class MarkerHoverLabel : MonoBehaviour
Inheritance
object
Object
Component
Behaviour
MonoBehaviour
MarkerHoverLabel

Fields

DefaultBackground

[Tooltip("Default tooltip background color.")]
public Color DefaultBackground

Field Value

Color

DefaultFontSize

[Tooltip("Default tooltip font size.")]
public int DefaultFontSize

Field Value

int

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

bool

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

BaseMapView

PickRadiusPx

[Tooltip("Pick radius around the cursor in screen pixels.")]
public float PickRadiusPx

Field Value

float

Pointer

[NonSerialized]
public IMapPointerSurface Pointer

Field Value

IMapPointerSurface

Prefabs

[Tooltip("Prefab-tier manager to hover with the bulk layer. Empty uses one on this GameObject.")]
public WorldMarkerManager Prefabs

Field Value

WorldMarkerManager

Tabletop

[Tooltip("Tabletop to hover floating markers on. Empty uses Pointer when it is a table.")]
public TabletopContentView Tabletop

Field Value

TabletopContentView

Properties

Hovered

public int Hovered { get; }

Property Value

int

HoveredRef

Cross-tier hover target. None when nothing is hovered.

public MarkerRef HoveredRef { get; }

Property Value

MarkerRef

Methods

NeedsRepick(Vector3, Vector3, MapViewTransform, MapViewTransform, bool)

public static bool NeedsRepick(Vector3 mouse, Vector3 lastMouse, MapViewTransform view, MapViewTransform lastView, bool hasLastView)

Parameters

mouse Vector3
lastMouse Vector3
view MapViewTransform
lastView MapViewTransform
hasLastView bool

Returns

bool

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

map BaseMapView
prefabs WorldMarkerManager
tabletop TabletopContentView
view MapViewTransform
cursor ScreenPoint
radiusPx double
hit MarkerRef
distanceSq double

Returns

bool