Skip to content

ProgressTexture

The ProgressTexture is used to render a progress bar texture that fills according to a specified direction. It combines an empty and a filled texture area to visually represent progress.

Basic Properties

FieldDescription
fillDirectionThe direction in which the progress fills
emptyBarAreaTexture used for the empty portion of the progress bar
filledBarAreaTexture used for the filled portion of the progress bar
progressThe current progress value (0.0 to 1.0)

APIs

setTexture

Sets the progress textures. emptyBarArea and filledBarArea can any type of the GUi Texture.

java
progressTexture.setTexture(emptyBarArea, filledBarArea);

setProgress

Sets the progress value.

java
progressTexture.setProgress(0.75);

setFillDirection

Sets the fill direction for the progress bar.

java
progressTexture.setFillDirection(ProgressTexture.FillDirection.RIGHT_TO_LEFT);

Released under the MIT License.