Module TextGauge

Creates a text based gauge, for use in miniconsoles and the like.

Functions

setWidth (width) Sets the width in characters of the gauge
setFillCharacter (character) Sets the character to use for the 'full' part of the gauge
setEmptyCharacter (character) Sets the character to use for the 'full' part of the gauge
setFillColor (color) Sets the fill color for the gauge.
setEmptyColor (color) Sets the empty color for the gauge.
setPercentColor (color) Sets the fill color for the gauge.
setPercentSymbolColor (color) Sets the fill color for the gauge.
enableShowPercent () Enables showing the percent value of the gauge
disableShowPercent () Disables showing the percent value of the gauge
enableShowPercentSymbol () Enables showing the percent symbol (appears after the value)
disableShowPercentSymbol () Enables showing the percent symbol (appears after the value)
setValue ([current[, max]]) Used to set the gauge's value and return the string representation of the gauge
print (...) Synonym for setValue
new ([options]) Creates a new TextGauge.


Functions

setWidth (width)
Sets the width in characters of the gauge

Parameters:

  • width number number of characters wide to make the gauge
setFillCharacter (character)
Sets the character to use for the 'full' part of the gauge

Parameters:

  • character string the character to use.
setEmptyCharacter (character)
Sets the character to use for the 'full' part of the gauge

Parameters:

  • character string the character to use.
setFillColor (color)
Sets the fill color for the gauge.

Parameters:

  • color string the color to use for the full portion of the gauge. Will be run through Geyser.Golor
setEmptyColor (color)
Sets the empty color for the gauge.

Parameters:

  • color string the color to use for the empty portion of the gauge. Will be run through Geyser.Golor
setPercentColor (color)
Sets the fill color for the gauge.

Parameters:

  • color string the color to use for the numeric value. Will be run through Geyser.Golor
setPercentSymbolColor (color)
Sets the fill color for the gauge.

Parameters:

  • color string the color to use for the numeric value. Will be run through Geyser.Golor
enableShowPercent ()
Enables showing the percent value of the gauge
disableShowPercent ()
Disables showing the percent value of the gauge
enableShowPercentSymbol ()
Enables showing the percent symbol (appears after the value)
disableShowPercentSymbol ()
Enables showing the percent symbol (appears after the value)
setValue ([current[, max]])
Used to set the gauge's value and return the string representation of the gauge

Parameters:

  • current number current value. If no value is passed it will use the stored value. Defaults to 50 to prevent errors. (optional)
  • max number maximum value. If not passed, the internally stored one will be used. Defaults to 100 so that it can be used with single values as a percent (optional)

Usage:

  • myGauge:setValue(55) -- sets the gauge to 55% full
  • myGauge:setValue(2345, 2780) -- will figure out what the percentage fill is based on the given current/max values
print (...)
Synonym for setValue

Parameters:

  • ...
new ([options])
Creates a new TextGauge. Please see the wiki for more information on valid options.

Parameters:

  • options table The table of options you would like the TextGauge to start with. (optional)
generated by LDoc 1.4.6 Last updated 2020-06-14 21:39:03