Module Progress

Druid component to handle the progress bars.

# Overview #

# Notes #

• Progress Node should be fully filled in your GUI scene node. It will be the progress maximum size

• Progress correct working with Slice9 nodes, it trying to set size by _set_size_ first, if it is not possible, it set up sizing via _set_scale_

• Progress bar can fill only by vertical or horizontal size. If you want make diagonal progress bar, just rotate node in GUI scene

• If you have glitchy or dark texture bug with progress bar, try to disable mipmaps in your texture profiles

Example Link

Functions

empty(self) Empty a progress bar
fill(self) Fill a progress bar and stop progress animation
get(self) Return current progress bar value
init(self, node, key[, init_value=1]) Progress constructor
set_max_size(self, max_size) Set progress bar max node size
set_steps(self, steps, callback) Set points on progress bar to fire the callback
set_to(self, to) Instant fill progress bar to value
to(self, to[, callback]) Start animation of a progress bar

Tables

style Component style params.

Fields

key The progress bar direction.
max_size Maximum size of progress bar
node Progress bar fill node
on_change On progress bar change callback(self, new_value)
scale Current progress bar scale
size Current progress bar size
slice Progress bar slice9 settings


Functions

empty(self)
Empty a progress bar

Parameters:

fill(self)
Fill a progress bar and stop progress animation

Parameters:

get(self)
Return current progress bar value

Parameters:

init(self, node, key[, init_value=1])
Progress constructor

Parameters:

  • self Progress Progress
  • node string or node Node name or GUI Node itself.
  • key string Progress bar direction: const.SIDE.X or const.SIDE.Y
  • init_value number Initial value of progress bar (default 1)
set_max_size(self, max_size)
Set progress bar max node size

Parameters:

  • self Progress Progress
  • max_size vector3 The new node maximum (full) size

Returns:

    Progress Progress
set_steps(self, steps, callback)
Set points on progress bar to fire the callback

Parameters:

  • self Progress Progress
  • steps number[] Array of progress bar values
  • callback function Callback on intersect step value

Usage:

    progress:set_steps({0, 0.3, 0.6, 1}, function(self, step) end)
set_to(self, to)
Instant fill progress bar to value

Parameters:

  • self Progress Progress
  • to number Progress bar value, from 0 to 1
to(self, to[, callback])
Start animation of a progress bar

Parameters:

  • self Progress Progress
  • to number value between 0..1
  • callback function Callback on animation ends (optional)

Tables

style
Component style params. You can override this component styles params in druid styles table or create your own style

Fields:

  • SPEED number Progress bas fill rate. More -> faster (default 5)
  • MIN_DELTA number Minimum step to fill progress bar (default 0.005)

Fields

key
The progress bar direction.

The values are: "x" or "y". (const.SIDE.X or const.SIDE.Y)

max_size
Maximum size of progress bar
  • max_size number
node
Progress bar fill node
on_change
On progress bar change callback(self, new_value)
scale
Current progress bar scale
  • scale vector3
size
Current progress bar size
  • size vector3
slice
Progress bar slice9 settings
  • slice vector4
generated by LDoc TESTING Last updated 2015-01-01 12:00:00