ProgressBar
Anthony Ma edited this page May 26, 2015
·
1 revision
Clone this wiki locally
A component that shows progress #Fields
-
xdefault: 1 - x value of the component -
ydefault: 1 - y value of the component -
hdefault: 1 - height of the component -
wdefault: 16 - width of the component -
zdefault: 0 - z value of the component -
valdefault: 0 - percentage of progress (0-100) -
parent- parent window object of the component -
removed- whether the component has been queued for removal - should only be modified by the library itself -
visibledefault: true - whether the component is visible -
bgColordefault: colors.white - the background color -
textColordefault: colors.black - the color of the text if in front of the background -
barColordefault: colors.lime - the color of the progress bar -
textAligndefault: "center" - alignment of the progress text -
vertCenterdefault: true - whether to vertically center the text -
barTextColordefault: colors.white - color of text if in front of the progress bar -
textMaskdefault: "{val}%" - masks the text that will be displayed - "{val}" is replaced withself.val
#Functions
-
function draw(self)- draws the label - should only be called by the library itself -
function update(self)- called every update cycle -
function termX(self)- returns the x position on the terminal -
function termY(self)- returns the y position on the terminal -
function setPos(self, x, y)- sets the position of the component -
function setSize(self, w, h)- sets the size of the component