Gauge

Defines a Gauge Compound.

Summary
GaugeDefines a Gauge Compound.
Variables
master_listA list of Gauges, used to update all Gauges.
Functions
VyzorGaugeUpdateA dirty global function to update all Vyzor Gauges.
new
New GaugeA lightweight container for Frames that will function as a dynamically resized bar.
Variables
current_addressIndex of current variable.
maximum_addressIndex of maximum variable.
background_frameFrame serving as Gauge’s background.
foreground_frameFrame serving as Gauge’s foreground.
overflow_framesContains the Gauge’s overflow frames.
caption_frameGenerated frame that can be echoed to.
auto_echoShould this Gauge echo every update?
text_formatFormat used when auto_echo is true.
fill_modeDetermines direction Gauge fills.
Properties
Gauge Properties
Functions
getFieldRetrieves the value of the given index.
UpdateUpdates the Gauge.
EchoDisplays text on the auto-generated caption Frame.
VyzorInitializeGaugesCalls update on each Gauge after Vyzor has been drawn.

Variables

master_list

local master_list

A list of Gauges, used to update all Gauges.

Functions

VyzorGaugeUpdate

function VyzorGaugeUpdate ()

A dirty global function to update all Vyzor Gauges.

new

local function new (_,
name,
current,
maximum,
init_back,
init_fore,
fill_enum,
init_over)

Parameters

nameThe name of the Gauge.
currentThe string address of the current stat to track.
maximumThe string address of the current stat to track.
init_backThe Background Frame.
init_foreThe Foreground Frame.  Size and Position values will be overwritten.
fill_enumGaugeFill Enum.  Determines direction Gauge fills.  Defaults to LeftRight.
init_overNumerically indexed table of Frames to be used for overflow.

New Gauge

A lightweight container for Frames that will function as a dynamically resized bar.

Summary
Variables
current_addressIndex of current variable.
maximum_addressIndex of maximum variable.
background_frameFrame serving as Gauge’s background.
foreground_frameFrame serving as Gauge’s foreground.
overflow_framesContains the Gauge’s overflow frames.
caption_frameGenerated frame that can be echoed to.
auto_echoShould this Gauge echo every update?
text_formatFormat used when auto_echo is true.
fill_modeDetermines direction Gauge fills.
Properties
Gauge Properties
Functions
getFieldRetrieves the value of the given index.
UpdateUpdates the Gauge.
EchoDisplays text on the auto-generated caption Frame.
VyzorInitializeGaugesCalls update on each Gauge after Vyzor has been drawn.

Variables

current_address

local current_address

Index of current variable.

maximum_address

local maximum_address

Index of maximum variable.

background_frame

local background_frame

Frame serving as Gauge’s background.

foreground_frame

local foreground_frame

Frame serving as Gauge’s foreground.

overflow_frames

local overflow_frames

Contains the Gauge’s overflow frames.

caption_frame

local caption_frame

Generated frame that can be echoed to.

auto_echo

local auto_echo

Should this Gauge echo every update?

text_format

local text_format

Format used when auto_echo is true.

fill_mode

local fill_mode

Determines direction Gauge fills.

Properties

Gauge Properties

NameReturns the Gauge’s name.
ContainerGets and sets the Gauge’s container.
CurrentAddressGets and sets the Gauge’s current variable index.
CurrentReturns the numeric value of the current variable.
MaximumAddressGets and sets the Gauge’s maximum variable index.
MaximumReturns the numeric value of the maximum variable.
BackgroundReturns the Gauge’s Background Frame.
ForegroundReturns the Gauge’s Foreground Frame.
FillModeGets and sets the Gauge’s fill direction.
AutoEchoGets and sets the Gauge’s auto_echo property.
TextFormatGets and sets the format used by auto_echo.  Must be compatible with string.format.
OverflowReturns a copy of the Gauge’s overflow Frames.

Functions

getField

local function getField (field)

Retrieves the value of the given index.

Parameters

fieldThe index of the value to be retrieved.

Update

function new_gauge:Update ()

Updates the Gauge.

Echo

function new_gauge:Echo (text)

Displays text on the auto-generated caption Frame.

Parameters

textThe text to be displayed.

VyzorInitializeGauges

function VyzorInitializeGauges ()

Calls update on each Gauge after Vyzor has been drawn.

local master_list
A list of Gauges, used to update all Gauges.
function VyzorGaugeUpdate ()
A dirty global function to update all Vyzor Gauges.
local function new (_,
name,
current,
maximum,
init_back,
init_fore,
fill_enum,
init_over)
local current_address
Index of current variable.
local maximum_address
Index of maximum variable.
local background_frame
Frame serving as Gauge’s background.
local foreground_frame
Frame serving as Gauge’s foreground.
local overflow_frames
Contains the Gauge’s overflow frames.
local caption_frame
Generated frame that can be echoed to.
local auto_echo
Should this Gauge echo every update?
local text_format
Format used when auto_echo is true.
local fill_mode
Determines direction Gauge fills.
local function getField (field)
Retrieves the value of the given index.
function new_gauge:Update ()
Updates the Gauge.
function new_gauge:Echo (text)
Displays text on the auto-generated caption Frame.
function VyzorInitializeGauges ()
Calls update on each Gauge after Vyzor has been drawn.
Close