Skip to content
ProgressBar

UI / ProgressBar

ProgressBar Class

Progress Bar

Hierarchy

Table of contents

Properties

click

Properties

onCustomPropertyChange: Readonly<MulticastDelegate<(path: string, value: unknown, oldValue: unknown) => void>> other
Monitor custom attribute synchronization events

Accessors

backgroundImageColor(): Readonly<LinearColor> other
Obtain the color of the background image
backgroundImageDrawType(): Readonly<SlateBrushDrawType> other
Get background image drawing type
backgroundImageGuid(): string other
Get background image id
backgroundImageMargin(): Readonly<Margin> other
Get the background image margin of the progress bar
backgroundImageSize(): Readonly<Vector2> other
Get the size of the background image
barThickness(): number other
Obtain the thickness of the progress bar
currentValue(): number other
Get current value
fillImageColor(): Readonly<LinearColor> other
Obtain the color of the filled image
fillImageDrawType(): Readonly<SlateBrushDrawType> other
Obtain the type of fill image drawing
fillImageGuid(): string other
Get the filled area image ID
fillImageMargin(): Readonly<Margin> other
Get Progress Bar image margin
fillImageSize(): Readonly<Vector2> other
Get filled image size
fillType(): ProgressBarFillType other
Get the filling method of Progress Bar
isRoundedToInt(): boolean other
Get whether the current value is rounding
onSliderValueChanged(): MulticastDelegate<(CurrentValue: number) => void> other
Slider value change event
percent(): number other
Get current percentage
slideMethod(): SlideMethod other
Get the sliding mode of the Progress Bar
sliderButtonPressDelegate(): MulticastDelegate<(CurrentValue: number) => void> other
Slider Press Event
sliderButtonReleaseDelegate(): MulticastDelegate<(CurrentValue: number) => void> other
Slider lifting event
sliderMaxValue(): number other
Get the maximum value of the drag bar
sliderMinValue(): number other
Get the minimum value of the drag bar
thumbImageColor(): Readonly<LinearColor> other
Get slider image color
thumbImageDrawType(): Readonly<SlateBrushDrawType> other
Get slider image drawing type
thumbImageGuid(): string other
Get the filled area image ID
thumbImageMargin(): Readonly<Margin> other
Get the margin of the drag bar image
thumbImageSize(): Readonly<Vector2> other
Get slider image size
click

Accessors

alignPosition(): Readonly<Vector2> other
Get the align position of the widget. When the align method is right align, bottom align, and center align, the value of alignPosition is different from that of position;
autoSizeHorizontalEnable(): boolean other
Get whether to automatically set the size horizontally
autoSizeVerticalEnable(): boolean other
Get whether to set the size automatically vertical
cachedGeometry(): Geometry other
Get the previous Get TickSpaceGeometry
constraints(): Readonly<UIConstraintAnchors> other
Get the layout of the control
desiredSize(): Vector2 other
Obtain expected size
enable(): boolean other
Is it available
guid(): string other
Get the widget GUID
isHovered(): boolean other
Is it hovered
mouseCursor(): MouseCursor other
Get the cursor type on the widget
name(): string other
Get Name
paintSpaceGeometry(): Geometry other
Get the last geometric information used to render the Widget
parent(): Widget other
Get parent node
pivot(): Vector2 other
Get the position of the widget anchor. This property determine the relative position of the widget graph and the anchor; At (0,0), the anchor point is located in the upper left corner of the control; (0.5,0.5), the anchor is at the center of the widget
position(): Readonly<Vector2> other
Get the position of the control
renderOpacity(): number other
Obtain rendering transparency
renderScale(): Vector2 other
Get rendering scaling
renderShear(): Vector2 other
Obtain rendering misalignment deformation
renderTransformAngle(): number other
Obtain the rendering angle
renderTransformPivot(): Vector2 other
Get Render anchor
size(): Vector2 other
Get size
tickSpaceGeometry(): Geometry other
Retrieve the last geometric information used to drive Widget Tick
transform(): Readonly<UITransform> other
Obtain the size and position of the control
visibility(): SlateVisibility other
Get visibility
visible(): boolean other
Is it visible
zOrder(): number other
Get Zorder

Methods

newObject(parent?: Canvas, inName?: string): ProgressBar other
Create ProgressBar widget
click

Methods

addChild(child: Widget): void other
Add child nodes
clone(position: Vector2, Parent?: any): Widget other
Clone the UI widget and its child nodes to the specified parent widget position (default to its parent node)
destroyObject(): void other
Remove and destroy immediately. Cannot be used again
equal(that: Widget): boolean other
Determine if it is the same object
findChildByPath(inPath: string): Widget other
Find nodes by relative path
getChildAt(index: number): Widget other
What is the position node to obtain
getChildByName<T: extends Widget<T>>(name: string): T: extends Widget<T> other
Search for nodes by name
getChildrenCount(): number other
Obtain the number of child nodes
getCustomProperties(): string[] other
Get all customize property
getCustomProperty<T: extends CustomPropertyType>(propertyName: string): T: extends CustomPropertyType other
Get customize property
getCustomPropertyChangeDelegate(property): Readonly<MulticastDelegate<(path: string, value: unknown, oldValue: unknown) => void>> other
Event proxy triggered when a given object property is modified
invalidateLayoutAndVolatility(): void other
Immediately trigger re rendering and layout calculation
removeAllChildren(): void other
Clearing all child nodes will destroy the UI and render it unusable
removeChild(child: Widget): void other
Removing a node will destroy the UI and make it unusable
removeChildAt(index: number): void other
Removing the third node will destroy the UI and render it unusable
removeObject(): void other
Immediately remove and add to the root node for reuse
serialize(): string other
Serialize UI widget
setCustomProperty(propertyName: string, value: undefined CustomPropertyType): void other
Set custom attributes
deserialize(Data: string, Parent?: Widget): Widget other
Deserialize UI

Properties

Accessors


backgroundImageColor

get backgroundImageColor(): Readonly<LinearColor> other

set backgroundImageColor(inColor): void other

Obtain the color of the background image

Returns

Readonly<LinearColor>Background image color, TypeLinearColor type, data range 0~1

Set background image color

Parameters

inColor LinearColorUsage: Background color, TypeLinearColor type, data range 0~1

backgroundImageDrawType

get backgroundImageDrawType(): Readonly<SlateBrushDrawType> other

set backgroundImageDrawType(InDrawType): void other

Get background image drawing type

Returns

Readonly<SlateBrushDrawType>Background image drawing type

Set the drawing type of background image

Parameters

InDrawType SlateBrushDrawTypeUsage: Brush type

backgroundImageGuid

get backgroundImageGuid(): string other

set backgroundImageGuid(inGUID): void other

Get background image id

Returns

stringBackground image ID

Set progress bar background image

Parameters

inGUID stringUsage: image GUID

void


backgroundImageMargin

get backgroundImageMargin(): Readonly<Margin> other

set backgroundImageMargin(inMargin): void other

Get the background image margin of the progress bar

Returns

Readonly<Margin>Progress Bar background image margin

Set progress bar background image margin

Parameters

inMargin MarginUsage: Progress bar background image margin

backgroundImageSize

get backgroundImageSize(): Readonly<Vector2> other

set backgroundImageSize(inSize): void other

Get the size of the background image

Returns

Readonly<Vector2>Image size

Set the size of the background image

Parameters

inSize Vector2Usage: Image size

barThickness

get barThickness(): number other

set barThickness(inputBarThickness): void other

Obtain the thickness of the progress bar

Returns

numberthickness

Set the thickness of the Progress Bar

Parameters

inputBarThickness numberUsage: Thickness

currentValue

get currentValue(): number other

set currentValue(inValue): void other

Get current value

Returns

numberCurrent value

set currency

Parameters

inValue numberUsage: current value

void


fillImageColor

get fillImageColor(): Readonly<LinearColor> other

set fillImageColor(inColor): void other

Obtain the color of the filled image

Returns

Readonly<LinearColor>Fill image color, TypeLinearColor type, data range 0~1

Set the color of the filled image

Parameters

inColor LinearColorUsage: Set color, TypeLinearColor type, data range 0~1

fillImageDrawType

get fillImageDrawType(): Readonly<SlateBrushDrawType> other

set fillImageDrawType(inDrawType): void other

Obtain the type of fill image drawing

Returns

Readonly<SlateBrushDrawType>Fill image drawing type

Set fill image drawing type

Parameters

inDrawType SlateBrushDrawTypeUsage: Fill type

fillImageGuid

get fillImageGuid(): string other

set fillImageGuid(inGUID): void other

Get the filled area image ID

Returns

stringFilled area image id

Set progress bar image

Parameters

inGUID stringUsage: image GUID

void


fillImageMargin

get fillImageMargin(): Readonly<Margin> other

set fillImageMargin(inMargin): void other

Get Progress Bar image margin

Returns

Readonly<Margin>Progress Bar image margin

Set Progress Bar image margin

Parameters

inMargin MarginUsage: Progress bar image margin

fillImageSize

get fillImageSize(): Readonly<Vector2> other

set fillImageSize(inSize): void other

Get filled image size

Returns

Readonly<Vector2>Image size

Set the fill image size

Parameters

inSize Vector2Usage: Size

fillType

get fillType(): ProgressBarFillType other

set fillType(inType): void other

Get the filling method of Progress Bar

Returns

ProgressBarFillTypeProgress Bar filling

Set the filling method of Progress Bar

Parameters

inType ProgressBarFillType{ From left to right, from right to left, from top to bottom, from bottom to top

void


isRoundedToInt

get isRoundedToInt(): boolean other

set isRoundedToInt(inToInt): void other

Get whether the current value is rounding

Returns

booleanIs the current value rounded to the nearest integer

Set whether the current value is rounded to the nearest integer

Parameters

inToInt booleanUsage: rounding or not

void


onSliderValueChanged

get onSliderValueChanged(): MulticastDelegate<(CurrentValue: number) => void> other

Slider value change event

Returns

MulticastDelegate<(CurrentValue: number) => void>Change event

percent

get percent(): number other

set percent(inPercent): void other

Get current percentage

Returns

numberCurrent percentage

Set current percentage

Parameters

inPercent numberUsage: percentage

void


slideMethod

get slideMethod(): SlideMethod other

set slideMethod(inSlideMethod): void other

Get the sliding mode of the Progress Bar

Returns

SlideMethod

Set the sliding mode of the progress bar

Parameters

inSlideMethodSlideMethod

sliderButtonPressDelegate

get sliderButtonPressDelegate(): MulticastDelegate<(CurrentValue: number) => void> other

Slider Press Event

Returns

MulticastDelegate<(CurrentValue: number) => void>Press Event

sliderButtonReleaseDelegate

get sliderButtonReleaseDelegate(): MulticastDelegate<(CurrentValue: number) => void> other

Slider lifting event

Returns

MulticastDelegate<(CurrentValue: number) => void>Lift up the event

sliderMaxValue

get sliderMaxValue(): number other

set sliderMaxValue(inValue): void other

Get the maximum value of the drag bar

Returns

numberDrag bar maximum value

Set the maximum value of the drag bar

Parameters

inValue numberUsage: maximum drag bar value

void


sliderMinValue

get sliderMinValue(): number other

set sliderMinValue(inValue): void other

Get the minimum value of the drag bar

Returns

numberDrag bar minimum value

Set the minimum value for the drag bar

Parameters

inValue numberUsage: Drag bar minimum value

void


thumbImageColor

get thumbImageColor(): Readonly<LinearColor> other

set thumbImageColor(inColor): void other

Get slider image color

Returns

Readonly<LinearColor>Slider image color, Type.LinearColor type, data range 0~1

Set slider image color

Parameters

inColor LinearColorUsage: Set color, TypeLinearColor type, data range 0~1

thumbImageDrawType

get thumbImageDrawType(): Readonly<SlateBrushDrawType> other

set thumbImageDrawType(inDrawType): void other

Get slider image drawing type

Returns

Readonly<SlateBrushDrawType>Slider image draw type

Set slider image drawing type

Parameters

inDrawType SlateBrushDrawTypeUsage: drawing type

thumbImageGuid

get thumbImageGuid(): string other

set thumbImageGuid(inGUID): void other

Get the filled area image ID

Returns

stringFilled area image id

Set the style of the drag bar

Parameters

inGUID stringUsage: Drag bar style with UID

void


thumbImageMargin

get thumbImageMargin(): Readonly<Margin> other

set thumbImageMargin(inMargin): void other

Get the margin of the drag bar image

Returns

Readonly<Margin>Drag bar image margin

Set drag bar image margin

Parameters

inMargin MarginUsage: drag bar image margin

thumbImageSize

get thumbImageSize(): Readonly<Vector2> other

set thumbImageSize(inSize): void other

Get slider image size

Returns

Readonly<Vector2>Image size

Set slider image size

Parameters

inSize Vector2Usage: slider image size

Methods


newObject

Static newObject(parent?, inName?): ProgressBar other

Create ProgressBar widget

Parameters

parent? CanvasUsage: Create the external parent object of the control with default: null
inName? stringUsage: name of the create widget default: null range: set a reasonable name

Returns

ProgressBarCreated objects

When the parent and inName are the same as an existing object, the old object will be destroyed