GUIMeter

new GUIMeter(id, options, guimanager, callback, append)

Creates a new GUIMeter

Parameters

NameTypeDescription
Name
id
Type
string
Description
The id and name element
Name
options
Type
json
Description
Options of element
Name
guimanager
Type
GUIManager
Description
The gui manager
Name
callback
Type
function
Description
Trigger function by change (optional)
Name
append
Type
bool
Description
is added to the <body>. => True by default (optional)

Options

  • w: width of meter (in pixel)
  • h: height of meter (in pixel)
  • x: position left of meter (in pixel)
  • y: position top of meter (in pixel)
  • min: min value meter => 0 by default (optional)
  • max: max value meter => 100 by default (optional)
  • border: border of element => 0 by default (optional)
  • borderRadius: radius border of element => 5 by default (optional)
  • background: background meter bar => "rgba(0, 0, 0, 0.2)" by default (optional)
  • backgroundValue: background value meter => "#1e9100" by default (optional)
  • value: current value of the meter => 0 by default (optional)
  • orient: orientation of the meter => "horizontal" by default (optional)
  • zIndex: depth of the element (int) => 1 by default
  • tabindex: Tab order of the field.

Methods

updateValue(int) → void

Set this progress value GUI element

setVisible(bool, fade) → void

Set this GUI element to visible or invisible

isVisible() → void

Returns element if is visible or no

dispose() → void

Dispose the GUIMeter, and delete element.