Table of Contents

Class ToastMessageInfo

Namespace
Uncreated.Warfare.Players.UI
Assembly
Uncreated.Warfare.dll
public sealed class ToastMessageInfo
Inheritance
ToastMessageInfo
Inherited Members

Constructors

ToastMessageInfo(ToastMessageStyle, int, bool, bool, bool, bool)

public ToastMessageInfo(ToastMessageStyle style, int channel, bool requiresClearing = false, bool inturrupt = false, bool canResend = false, bool requiresResend = false)

Parameters

style ToastMessageStyle
channel int
requiresClearing bool
inturrupt bool
canResend bool
requiresResend bool

ToastMessageInfo(ToastMessageStyle, int, UnturnedUI, SendToastWithCustomUI, bool, bool)

public ToastMessageInfo(ToastMessageStyle style, int channel, UnturnedUI ui, SendToastWithCustomUI sendCallbackAction, bool requiresClearing = false, bool inturrupt = false)

Parameters

style ToastMessageStyle
channel int
ui UnturnedUI
sendCallbackAction SendToastWithCustomUI
requiresClearing bool
inturrupt bool
public ToastMessageInfo(ToastMessageStyle style, int channel, IAssetLink<EffectAsset> asset, bool requiresClearing = false, bool inturrupt = false, bool canResend = false, bool requiresResend = false)

Parameters

style ToastMessageStyle
channel int
asset IAssetLink<EffectAsset>
requiresClearing bool
inturrupt bool
canResend bool
requiresResend bool

Properties

Asset

The effect to send to the player.

public IAssetLink<EffectAsset> Asset { get; }

Property Value

IAssetLink<EffectAsset>

CanResend

If ResendNames have been configured to allow resending the text components when

public bool CanResend { get; }

Property Value

bool

Channel

Overlapping toasts are split up into channels. Each channel can only show one toast at a time.

public int Channel { get; }

Property Value

int

ClearableSlots

Number of actual slots in the UI that will be sent an empty string if not supplied as an argument.

public int ClearableSlots { get; set; }

Property Value

int

DisableFlags

Widget flags to disable when the UI is sent.

public EPluginWidgetFlags DisableFlags { get; set; }

Property Value

EPluginWidgetFlags

Duration

public float Duration { get; set; }

Property Value

float

EnableFlags

Widget flags to enable when the UI is sent.

public EPluginWidgetFlags EnableFlags { get; set; }

Property Value

EPluginWidgetFlags

Inturrupt

If this toast should inturrupt whatever toast is currently playing instead of queueing after it plays.

public bool Inturrupt { get; }

Property Value

bool

Key

Unique key for UI that requires clearing or setting values.

public short Key { get; }

Property Value

short

Reliable

Should this effect be sent with a high reliability (in terms of how it's networked).

public bool Reliable { get; set; }

Property Value

bool

RequiresClearing

If this effect needs to be cleared when it's Duration is over.

public bool RequiresClearing { get; }

Property Value

bool

Remarks

Most effects will use Lifetime = X and Lifetime_Spread = 0 to auto-clear.

RequiresResend

public bool RequiresResend { get; }

Property Value

bool

ResendNames

Names of all text components in order of their arguments ({0}, etc). CanResend must be set to true for this to work.

public string[] ResendNames { get; set; }

Property Value

string[]

Remarks

Embedding plugin keys only works when the value is sent separately.

SendCallback

Callback to invoke when sending with a managed UI.

public SendToastWithCustomUI? SendCallback { get; }

Property Value

SendToastWithCustomUI

Style

Toast style this info represents.

public ToastMessageStyle Style { get; }

Property Value

ToastMessageStyle

UI

Optional managed UI to use.

public UnturnedUI? UI { get; }

Property Value

UnturnedUI

Methods

public void UpdateAsset(IAssetLink<EffectAsset> assetContainer)

Parameters

assetContainer IAssetLink<EffectAsset>