Documentation > GUI > ProgressBar

Parent du composant : Panel
Version: 2.0.4

Constructor ProgressBar.new(X, Y, Width, Height, Value, Max, FrontColor, BorderColor, BackColor, Z, BorderThickness)

This function creates a new ProgressBar object.

X

Position on the X axis of the progress bar.

Y

Position on the Y axis of the progress bar.

Width

Width of the space occupied by the progress bar.

Height

Height of the space occupied by the progress bar.

Value

Current value of the progress bar.

Max

Max value of the progress bar.

FrontColor

Front color of the progress bar.

BorderColor

Border color of the progress bar.

BackColor

Back color of the progress bar.

Z

Z-Order of the progress bar.

BorderThickness

Thickness of the border.

Return

Return an instance of ProgressBar object.

ProgressBar:draw()

This function draw the progress bar with its image if define; otherwise with its colors.

ProgressBar:getMaxValue()

This function returns the max value of the progress bar.

Return

Max value of the progress bar.

ProgressBar:getValue()

This function returns the current value of the progress bar.

Return

Current value of the progress bar.

ProgressBar:setImages(Back, Bar)

This function sets the back and front image to draw the progress bar. The progress bar is adjusted to the dimensions of the image used for the back.

Back

Image used for the back.

Bar

Image used to draw the bar.

ProgressBar:setColor(FrontColor, BorderColor, BackColor)

This function sets the colors of the progress bar.

FrontColor

Color for the front.

BorderColor

Color for the border.

BackColor

Color for the back.

ProgressBar:setChangeTimer(Timer, Value)

This function defines the values for the automatic fill.

Timer

Duration to wait before an automatic update of the value.

Value

Value to increase the progress bar.

ProgressBar:setValue(Value)

This function sets the current value of the progress bar.

Value

Current value of the progress bar (must be between 0 and Max).

ProgressBar:update(dt)

This funtion launches all updates needed for the current progress bar.

dt

Delta time.

ProgressBar:toString(NoTitle)

This function display all variables containing in the current ProgressBar instance (tables and functions are excluded).

NoTitle

Indicates if the title must be displayed (false) or not (true).