跳到主要内容
版本:1.0.0

Struct MarkerStyle

Namespace: OblivionMp.Sdk.Values
Assembly: OblivionMp.Sdk.dll

How a marker looks and where it sits. Start from Default and change what you need: MarkerStyle.Default with { Socket = "head", Background = new(0, 0, 0, 0.6f), MaxWidth = 300 }.

public readonly struct MarkerStyle : IEquatable<MarkerStyle>

Implements​

IEquatable<MarkerStyle>

Inherited Members​

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Remarks​

Values out of range are corrected rather than rejected: a font size below 1 becomes the default size, a negative or non-finite MaxWidth becomes 0, a non-finite OffsetZ becomes the default offset, a negative OutlineSize becomes 0, and the background's and outline's channels are clamped to 0..1. default(MarkerStyle) is therefore usable, but has an OffsetZ of 0; prefer Default.

Constructors​

MarkerStyle()​

Creates the default style; see Default.

public MarkerStyle()

Properties​

Background​

Colour of the box behind the text, alpha included. Fully transparent by default.

public MarkerColor Background { get; init; }

Property Value​

MarkerColor

Default​

The look markers have when created without a style: today's name tag.

public static MarkerStyle Default { get; }

Property Value​

MarkerStyle

FontSize​

Font size, in the unit of the Unreal Engine UMG designer.

public int FontSize { get; init; }

Property Value​

int

MaxWidth​

Width in widget pixels at which the text wraps onto a new line, or 0 to never wrap.

public float MaxWidth { get; init; }

Property Value​

float

OffsetZ​

Height in cm, straight up, above the top of the character: above Socket when the character's mesh has it, otherwise above the top of its capsule. The marker grows upward from there.

public float OffsetZ { get; init; }

Property Value​

float

OutlineColor​

Colour of the outline around the text, alpha included. Opaque black by default.

public MarkerColor OutlineColor { get; init; }

Property Value​

MarkerColor

OutlineSize​

Thickness of the outline around the text, in UMG font outline units; 0 for no outline.

public int OutlineSize { get; init; }

Property Value​

int

Socket​

Bone or socket on the character's mesh to follow, such as head for humanoids. Skeletons name their bones differently, so a socket the mesh does not have falls back to the top of the capsule. null or blank always uses the top of the capsule.

public string? Socket { get; init; }

Property Value​

string?

Methods​

Equals(object)​

public override bool Equals(object obj)

Parameters​

obj object

Returns​

bool

Equals(MarkerStyle)​

public bool Equals(MarkerStyle other)

Parameters​

other MarkerStyle

Returns​

bool

GetHashCode()​

public override int GetHashCode()

Returns​

int

ToString()​

public override string ToString()

Returns​

string

Operators​

operator ==(MarkerStyle, MarkerStyle)​

public static bool operator ==(MarkerStyle left, MarkerStyle right)

Parameters​

left MarkerStyle

right MarkerStyle

Returns​

bool

operator !=(MarkerStyle, MarkerStyle)​

public static bool operator !=(MarkerStyle left, MarkerStyle right)

Parameters​

left MarkerStyle

right MarkerStyle

Returns​

bool

  • Remarks
  • Constructors
    • MarkerStyle()
  • Properties
    • Background
    • Default
    • FontSize
    • MaxWidth
    • OffsetZ
    • OutlineColor
    • OutlineSize
    • Socket
  • Methods
    • Equals(object)
    • Equals(MarkerStyle)
    • GetHashCode()
    • ToString()
  • Operators
    • operator ==(MarkerStyle, MarkerStyle)
    • operator !=(MarkerStyle, MarkerStyle)