Table of Contents

Interface IWorldLabelAutomation

Namespace
AcDream.Plugin.Abstractions
Assembly
AcDream.Plugin.Abstractions.dll

Hanging text labels over objects in the world: name tags, distances, whatever a plugin wants the player to read at a glance.

The labels are not occluded: a label shows through a wall, a hill or another object, because the interface is drawn after the world with no depth to test against. A plugin that needs a label to disappear with its object behind cover has to decide that itself.

public interface IWorldLabelAutomation

Fields

MaximumLabels

The most labels one plugin may have showing at once. A larger set is refused as a whole rather than trimmed, so a plugin finds out.

public const int MaximumLabels = 256

Field Value

int

MaximumTextLength

The most characters one label's text may have. A label is laid out again every frame, so its text is bounded; a longer one is dropped from the set rather than cut short.

public const int MaximumTextLength = 128

Field Value

int

Methods

ShowLabels(IReadOnlyList<PluginWorldLabel>)

Replaces every label this plugin has showing with the given set. The set is copied; the list may be reused afterwards. Labels with a zero object id, no text, text longer than MaximumTextLength, a colour component or height offset that is not a finite number, or a range that is not a positive finite number are dropped from the set. An empty set clears the plugin's labels.

bool ShowLabels(IReadOnlyList<PluginWorldLabel> labels)

Parameters

labels IReadOnlyList<PluginWorldLabel>

The labels to show from now on.

Returns

bool

True when the set was taken. False when it held more than MaximumLabels entries, in which case the labels already showing are left as they were, or when this host cannot show labels, which is what the default implementation always reports.