Class ImageProgressBar
- Namespace
- Uncreated.Warfare.Interaction.UI
- Assembly
- Uncreated.Warfare.dll
public class ImageProgressBar : ILabel, IElement
- Inheritance
-
ImageProgressBar
- Implements
-
ILabelIElement
- Inherited Members
Constructors
ImageProgressBar(string)
public ImageProgressBar(string rootPath)
Parameters
rootPathstring
ImageProgressBar(string, Func<float, ImageProgressBar, string>)
public ImageProgressBar(string rootPath, Func<float, ImageProgressBar, string> logicNameAccessor)
Parameters
rootPathstringlogicNameAccessorFunc<float, ImageProgressBar, string>
ImageProgressBar(string, string?, string?, string?, string?)
public ImageProgressBar(string rootPath, string? backgroundPath, string? foregroundPath, string? labelPath, string? logicBasePath)
Parameters
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
rootPathstringbackgroundPathstringforegroundPathstringlabelPathstringlogicBasePathstringlogicNameAccessorFunc<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
Resolution
100 / the number of animations.
public int Resolution { get; set; }
Property Value
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
connectionITransportConnectioncolorColor32
Remarks
Thread-safe
SetProgress(ITransportConnection, float)
Sets the progress of the bar.
public void SetProgress(ITransportConnection connection, float progress)
Parameters
connectionITransportConnectionprogressfloatValue from 0-1 representing how far the progress bar is from finishing.
Remarks
Thread-safe