progressbar

progress bar is an api for drawing & updating progress bars.

create(x, y, w, h, fg, bg [, fill [, terminal]])Create a bar object
create(x, y, w, h, fg, bg [, fill [, terminal]])Source

Create a bar object

Parameters

  1. x number X coordinate of the bar.
  2. y number Y coordinate of the bar.
  3. w number Width of the bar.
  4. h number Height of the bar.
  5. fg number The colour of the filled in bar.
  6. bg number The colour of the background of the bar.
  7. fill? number The pre filled portion of the bar. Defaults to 0.
  8. terminal? table The terminal to draw the bar on. Defaults to term.current().

Types

bar

The progress bar object itself. Returns by create

bar.update(percent)Source

Update the bar to a percentage from 0 to 100.

Parameters

  1. percent number Percentage of how full the bar is.
bar:redraw()Source

Redraw the bar, putting it overtop of whatever has been drawn since.