
Overview
The compass widget system provides a horizontal compass strip with dynamically positioned markers. UCCompassWidget manages a panel of UCCompassMarkWidget instances, each representing a point of interest. Markers are positioned by X offset, scaled by distance and faded by alpha. The closest-to-center marker shows its distance and type label.
| Name |
Description |
| consume |
Initializes the compass: sets source actor and auto-removes with it. Also dispatches to action handlers |
| consumeWhenAddPosition |
Adds or updates a marker at a given index with position, distance, alpha and visibility |
| consumeWhenClosestCenter |
Hides distance/type labels on the previous closest marker, shows them on the new closest |
| consumeWhenRemovePosition |
Removes a marker at a given index from the panel |
| retrieveCompassMarkClass |
Returns the mark widget class (default: CCompassMarkWidgetDefault). Override in Blueprint |
// UCCompassWidget dispatches consume based on the map key:
// - getWOEName(): initialization (source actor)
// - CNAME_AddPosition: add/update a marker
// - CNAME_ClosestCenter: update which marker shows distance/type labels
// - CNAME_RemovePosition: remove a marker
// AddPosition data:
// - object: source actor
// - aName: main tag (resource type)
// - intArray[0]: marker index, intArray[1]: z-order
// - floatArray[0]: X position, floatArray[1]: distance in meters, floatArray[2]: alpha
// - aBool: visibility
| Name |
Description |
| consume |
Updates the marker: sets icon from resource metadata, distance text, type label, visibility and scale |
// UCCompassMarkWidget receives data via consume:
// - aName: resource tag (used to retrieve icon and label from FCResourceMetadataStruct)
// - floatArray[0]: distance in meters, floatArray[1]: alpha
// - aBool: visibility
// The marker is hidden if distance is outside [markHiddenBeforeMinimumDistanceInMeter, markHiddenAfterMaximumDistanceInMeter].
// If distanceInMeterToScaleRatio curve is set, the marker scales based on distance.
// Distance text and type label are hidden by default, shown only for the closest-to-center marker.