File docs/luadoc/goo.progressbar.luadoc

Progress bar useful giving users feedback on loading or game status such as health, magic etc.

Functions

goo.progressbar:draw () Internal function to draw the progress bar, you may wish to override however.
goo.progressbar:getPercentage () Returns the current percentage of progress.
goo.progressbar:getProgress () Returns the current progress value.
goo.progressbar:incrementProgress () Increments the progress by 1
goo.progressbar:setPercentage (percentage) Sets the width of the progress bar to the specified percentage, i.e.
goo.progressbar:setProgress (progress) Sets the progress value, should be a number within the range you defined.
goo.progressbar:setRange (min, max) Sets the range of the progress bar, i.e.


Functions

goo.progressbar:draw ( )

Internal function to draw the progress bar, you may wish to override however.

goo.progressbar:getPercentage ( )

Returns the current percentage of progress.

Return value:

number: percentage of progress (0-100%).

goo.progressbar:getProgress ( )

Returns the current progress value.

goo.progressbar:incrementProgress ( )

Increments the progress by 1

goo.progressbar:setPercentage ( percentage )

Sets the width of the progress bar to the specified percentage, i.e. 50% is half the width.

Parameters

  • percentage :number
    a percentage value to set the width of the progress bar (0-100%).
goo.progressbar:setProgress ( progress )

Sets the progress value, should be a number within the range you defined.

Parameters

  • progress :number
    a number between the range you defined

See also:

goo.progressbar:setRange ( min, max )

Sets the range of the progress bar, i.e. if you're downloading a file 1024 bytes in size you would set the range to min = 0, max = 1024

Parameters

  • min :number
    the minimum value the progress bar will reperesent at 0% width.
  • max :number
    the maximum value the progress bar will reperesent at 100% width.

Return value:

number: the range of the value ( max - min ).

Valid XHTML 1.0!