Module Geyser.Gauge

Represents a gauge that can be either vertical or horizontal.


See also: Mudlet Manual

Info:

  • Author: guy

Functions

Geyser.Gauge:disableClickthrough () Sets the gauge to once again intercept mouse events
Geyser.Gauge:echo (message, color, format) Sets the text on the gauge, overwrites inherited echo function.
Geyser.Gauge:enableClickthrough () Sets the gauge to no longer intercept mouse events
Geyser.Gauge:resetToolTip () Resets the tooltip of the gauge
Geyser.Gauge:setAlignment (alignment) Set the alignment of the text on the gauge
Geyser.Gauge:setBold (bool) Set whether or not the text in the gauge should be bold
Geyser.Gauge:setColor (r, g, b, text) Sets the gauge color.
Geyser.Gauge:setFgColor (color) Sets the color of the text on the gauge
Geyser.Gauge:setFontSize (fontSize) Set the font size for the gauge to use
Geyser.Gauge:setFormat (format) Set the format for text on the gauge
Geyser.Gauge:setItalics (bool) Set whether or not the text in the gauge should be italic
Geyser.Gauge:setStrikethrough (bool) Set whether or not the text in the gauge should be strikethrough
Geyser.Gauge:setStyleSheet (css, cssback, cssText) Sets the style sheet for the gauge
Geyser.Gauge:setText (text) Sets the text on the gauge.
Geyser.Gauge:setToolTip (txt, duration) Sets the tooltip of the gauge
Geyser.Gauge:setUnderline (bool) Set whether or not the text in the gauge should be underlined
Geyser.Gauge:setValue (currentValue, maxValue, text) Sets the gauge amount.

Fields

Geyser.Gauge Represents a gauge that can be either vertical or horizontal.


Functions

Geyser.Gauge:disableClickthrough ()
Sets the gauge to once again intercept mouse events
Geyser.Gauge:echo (message, color, format)
Sets the text on the gauge, overwrites inherited echo function.

Parameters:

  • message the text to set
  • color the color of the text
  • format the text format
Geyser.Gauge:enableClickthrough ()
Sets the gauge to no longer intercept mouse events
Geyser.Gauge:resetToolTip ()
Resets the tooltip of the gauge
Geyser.Gauge:setAlignment (alignment)
Set the alignment of the text on the gauge

Parameters:

  • alignment Valid alignments are 'c', 'center', 'l', 'left', 'r', 'right', or '' to not include the alignment as part of the echo
Geyser.Gauge:setBold (bool)
Set whether or not the text in the gauge should be bold

Parameters:

  • bool True for bold
Geyser.Gauge:setColor (r, g, b, text)
Sets the gauge color.

Parameters:

  • r The red component, or a named color like "green".
  • g the green component, or nil if using a named color.
  • b the blue component, or nil if using a named color.
  • text The text to display on the gauge, it is optional.
Geyser.Gauge:setFgColor (color)
Sets the color of the text on the gauge

Parameters:

  • color the color you want the text to be. Can use color names such as "red", decho codes such as "<255,0,0>" and hex codes such as "#ff0000"
Geyser.Gauge:setFontSize (fontSize)
Set the font size for the gauge to use

Parameters:

  • fontSize the font size to use for the gauge. Should be a number
Geyser.Gauge:setFormat (format)
Set the format for text on the gauge

Parameters:

  • format the format to set. Same as Geyser.Label:setFormat
Geyser.Gauge:setItalics (bool)
Set whether or not the text in the gauge should be italic

Parameters:

  • bool True for bold
Geyser.Gauge:setStrikethrough (bool)
Set whether or not the text in the gauge should be strikethrough

Parameters:

  • bool True for strikethrough
Geyser.Gauge:setStyleSheet (css, cssback, cssText)
Sets the style sheet for the gauge

Parameters:

  • css Style sheet for the front label
  • cssback Style sheet for the back label
  • cssText Style sheet for the text label
Geyser.Gauge:setText (text)
Sets the text on the gauge.

Parameters:

  • text The text to set.
Geyser.Gauge:setToolTip (txt, duration)
Sets the tooltip of the gauge

Parameters:

  • txt the tooltip txt
  • duration the duration of the tooltip
Geyser.Gauge:setUnderline (bool)
Set whether or not the text in the gauge should be underlined

Parameters:

  • bool True for underlined
Geyser.Gauge:setValue (currentValue, maxValue, text)
Sets the gauge amount.

Parameters:

  • currentValue Current numeric value, or if maxValue is omitted, then it is assumed that currentValue is a value between 0 and 100 and is used to set the gauge.
  • maxValue Maximum numeric value. Optionally nil, see above.
  • text The text to display on the gauge, it is optional.

Fields

Geyser.Gauge
Represents a gauge that can be either vertical or horizontal.
  • value Percentage value of how "full" the gauge is.
  • strict If true, will cap the value of the gauge at 100, preventing it from overflowing the edge. Defaults to false to maintain old behaviours from before this was added.
  • orientation "horizontal" is the default and creates a horizontal gauge that fills from left to right. "vertical" creates a gauge that fills from bottom to top. "goofy" is horizontal but fills right to left. "batty" is vertical but fills from top to bottom.
  • color Color base for this gauge. Default is #808080
generated by LDoc 1.5.0 Last updated 2024-04-26 00:56:21