Class TextGauge

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

Methods

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


Methods

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

Parameters:

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

Parameters:

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

Parameters:

  • character string the character to use.
TextGauge: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
TextGauge: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
TextGauge: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
TextGauge: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
TextGauge:enableShowPercent()
Enables showing the percent value of the gauge
TextGauge:disableShowPercent()
Disables showing the percent value of the gauge
TextGauge:enableShowPercentSymbol()
Enables showing the percent symbol (appears after the value)
TextGauge:disableShowPercentSymbol()
Enables showing the percent symbol (appears after the value)
TextGauge: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
TextGauge:print(...)
Synonym for setValue

Parameters:

  • ...
TextGauge: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-19 19:46:32