Search Results for

    Show / Hide Table of Contents

    Class Borders

    Controls multiple Rect Transform Offset to display a Border around the ProgressBar,
    simply set the size to 0 if you don't want to use it.

    Inheritance
    object
    Borders
    Namespace: TetraCreations.ProgressBarSystem
    Assembly: cs.temp.dll.dll
    Syntax
    [Serializable]
    public class Borders

    Fields

    _backgroundRectTransform

    Declaration
    protected RectTransform _backgroundRectTransform
    Field Value
    Type Description
    RectTransform

    _bottom

    Declaration
    protected float _bottom
    Field Value
    Type Description
    float

    _decreaseSegmentRectTransform

    Declaration
    protected RectTransform _decreaseSegmentRectTransform
    Field Value
    Type Description
    RectTransform

    _fillSegmentRectTransform

    Declaration
    protected RectTransform _fillSegmentRectTransform
    Field Value
    Type Description
    RectTransform

    _image

    Declaration
    protected Image _image
    Field Value
    Type Description
    Image

    _increaseSegmentRectTransform

    Declaration
    protected RectTransform _increaseSegmentRectTransform
    Field Value
    Type Description
    RectTransform

    _initialized

    Declaration
    protected bool _initialized
    Field Value
    Type Description
    bool

    _left

    Declaration
    protected float _left
    Field Value
    Type Description
    float

    _rectTransform

    Declaration
    protected RectTransform _rectTransform
    Field Value
    Type Description
    RectTransform

    _right

    Declaration
    protected float _right
    Field Value
    Type Description
    float

    _size

    Declaration
    protected float _size
    Field Value
    Type Description
    float

    _top

    Declaration
    protected float _top
    Field Value
    Type Description
    float

    Properties

    Bottom

    Get / Set the bottom border size. Call UpdateSize() to apply changes.

    Declaration
    public float Bottom { get; set; }
    Property Value
    Type Description
    float

    Color

    Get / Set the border color

    Declaration
    public Color Color { get; set; }
    Property Value
    Type Description
    Color

    Image

    Get / Set the border image component

    Declaration
    public Image Image { get; set; }
    Property Value
    Type Description
    Image

    Initialized

    Declaration
    public bool Initialized { get; protected set; }
    Property Value
    Type Description
    bool

    Left

    Get / Set the left border size. Call UpdateSize() to apply changes.

    Declaration
    public float Left { get; set; }
    Property Value
    Type Description
    float

    Right

    Get / Set the right border size. Call UpdateSize() to apply changes.

    Declaration
    public float Right { get; set; }
    Property Value
    Type Description
    float

    Size

    Get / Set the border size, UpdateSize() is called in the setter.

    Declaration
    public float Size { get; set; }
    Property Value
    Type Description
    float

    Sprite

    Get / Set the border sprite.

    Declaration
    public Sprite Sprite { get; set; }
    Property Value
    Type Description
    Sprite

    Top

    Get / Set the top border size. Call UpdateSize() to apply changes.

    Declaration
    public float Top { get; set; }
    Property Value
    Type Description
    float

    Methods

    FetchComponents(ProgressBar)

    Keep references of all Rect Transform of the ProgressBar that need to be updated as the size of the border changes.

    Declaration
    protected virtual void FetchComponents(ProgressBar progressBar)
    Parameters
    Type Name Description
    ProgressBar progressBar

    Hide()

    Disable the border Image component

    Declaration
    public void Hide()

    Initialize(ProgressBar)

    Initial border setup, we get the rectTransform of the progressBar and all bar segments rect transform to update their size to display the border.

    Declaration
    public virtual void Initialize(ProgressBar progressBar)
    Parameters
    Type Name Description
    ProgressBar progressBar

    Show()

    Enable the border Image component

    Declaration
    public void Show()

    UpdateSize()

    Visually change the border size of the Progress Bar by offseting all rect transforms.

    Declaration
    public virtual void UpdateSize()
    In This Article
    Back to top Tetra Creations documentation