Table of Contents

Class ImageProgressBar

Namespace
Uncreated.Warfare.Interaction.UI
Assembly
Uncreated.Warfare.dll
public class ImageProgressBar : ILabel, IElement
Inheritance
ImageProgressBar
Implements
ILabel
IElement
Inherited Members

Constructors

ImageProgressBar(string)

public ImageProgressBar(string rootPath)

Parameters

rootPath string

ImageProgressBar(string, Func<float, ImageProgressBar, string>)

public ImageProgressBar(string rootPath, Func<float, ImageProgressBar, string> logicNameAccessor)

Parameters

rootPath string
logicNameAccessor Func<float, ImageProgressBar, string>

ImageProgressBar(string, string?, string?, string?, string?)

public ImageProgressBar(string rootPath, string? backgroundPath, string? foregroundPath, string? labelPath, string? logicBasePath)

Parameters

rootPath string
backgroundPath string
foregroundPath string
labelPath string
logicBasePath string

ImageProgressBar(string, string?, string?, string?, string?, Func<float, ImageProgressBar, string>)

public ImageProgressBar(string rootPath, string? backgroundPath, string? foregroundPath, string? labelPath, string? logicBasePath, Func<float, ImageProgressBar, string> logicNameAccessor)

Parameters

rootPath string
backgroundPath string
foregroundPath string
labelPath string
logicBasePath string
logicNameAccessor Func<float, ImageProgressBar, string>

Properties

Background

public UnturnedImage Background { get; }

Property Value

UnturnedImage

Foreground

public UnturnedImage Foreground { get; }

Property Value

UnturnedImage

Label

The base label element.

public UnturnedLabel Label { get; }

Property Value

UnturnedLabel

NeedsToSetLabel

If the label has to be set separately instead of by animation.

public bool NeedsToSetLabel { get; set; }

Property Value

bool

Resolution

100 / the number of animations.

public int Resolution { get; set; }

Property Value

int

Root

public UnturnedUIElement Root { get; }

Property Value

UnturnedUIElement

Methods

SetColor(ITransportConnection, Color32)

Sets the color of the progress bar using an image API that returns a 1x1 image of a given color.

public void SetColor(ITransportConnection connection, Color32 color)

Parameters

connection ITransportConnection
color Color32

Remarks

Thread-safe

SetProgress(ITransportConnection, float)

Sets the progress of the bar.

public void SetProgress(ITransportConnection connection, float progress)

Parameters

connection ITransportConnection
progress float

Value from 0-1 representing how far the progress bar is from finishing.

Remarks

Thread-safe