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
Assembly: cs.temp.dll.dll
Syntax
[Serializable]
public class Borders
Fields
Declaration
protected RectTransform _backgroundRectTransform
Field Value
| Type |
Description |
| RectTransform |
|
_bottom
Declaration
Field Value
Declaration
protected RectTransform _decreaseSegmentRectTransform
Field Value
| Type |
Description |
| RectTransform |
|
Declaration
protected RectTransform _fillSegmentRectTransform
Field Value
| Type |
Description |
| RectTransform |
|
_image
Declaration
Field Value
Declaration
protected RectTransform _increaseSegmentRectTransform
Field Value
| Type |
Description |
| RectTransform |
|
_initialized
Declaration
protected bool _initialized
Field Value
_left
Declaration
Field Value
Declaration
protected RectTransform _rectTransform
Field Value
| Type |
Description |
| RectTransform |
|
_right
Declaration
Field Value
_size
Declaration
Field Value
_top
Declaration
Field Value
Properties
Bottom
Get / Set the bottom border size. Call UpdateSize() to apply changes.
Declaration
public float Bottom { get; set; }
Property Value
Color
Get / Set the border color
Declaration
public Color Color { get; set; }
Property Value
Image
Get / Set the border image component
Declaration
public Image Image { get; set; }
Property Value
Initialized
Declaration
public bool Initialized { get; protected set; }
Property Value
Left
Get / Set the left border size. Call UpdateSize() to apply changes.
Declaration
public float Left { get; set; }
Property Value
Right
Get / Set the right border size. Call UpdateSize() to apply changes.
Declaration
public float Right { get; set; }
Property Value
Size
Get / Set the border size, UpdateSize() is called in the setter.
Declaration
public float Size { get; set; }
Property Value
Sprite
Get / Set the border sprite.
Declaration
public Sprite Sprite { get; set; }
Property Value
Top
Get / Set the top border size. Call UpdateSize() to apply changes.
Declaration
public float Top { get; set; }
Property Value
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
Hide()
Disable the border Image component
Declaration
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
Show()
Enable the border Image component
Declaration
UpdateSize()
Visually change the border size of the Progress Bar by offseting all rect transforms.
Declaration
public virtual void UpdateSize()