Difference between revisions of "LavishGUI:lguigauge (Data Type)"

From Lavish Software Wiki
Jump to navigation Jump to search
Line 24: Line 24:
 
   Value: .25
 
   Value: .25
 
===Set a gauge's range===
 
===Set a gauge's range===
*UIElement[test].FindChild[test]:SetRange[99]
+
*UIElement[test].FindChild[test]:SetRange[100]
:sets range from 0 to 99
+
:sets range from 0 to 100
 
===Set a gauge's value===
 
===Set a gauge's value===
*UIElement[test].FindChild[test]:SetValue[49]
+
*UIElement[test].FindChild[test]:SetValue[50]
 
:this would set it at exactly the halfway point
 
:this would set it at exactly the halfway point
  

Revision as of 22:21, 30 August 2005

Description

Members

  • bool Vertical : TRUE if gauge goes up and down
  • float Range : determines what scale the gauge uses, from 0-<Range>
  • float Value : determines how full the gauge is

Methods

  • SetRange[#] : sets the range for the gauge from 0 to <#>
  • SetValue[#] : sets the value used to determine how filled the gauge is
Tip: If you set range to 1, your set value will be percent based (.1 will be 10%)

Inherits

isuielement

Returns

Same as isuielement.Name

Examples

Display the range and value of a gauge

  • echo Range: ${UIElement[test].FindChild[test].Range}
  • echo Value: ${UIElement[test].FindChild[test].Value}
Output
 Range: 1
 Value: .25

Set a gauge's range

  • UIElement[test].FindChild[test]:SetRange[100]
sets range from 0 to 100

Set a gauge's value

  • UIElement[test].FindChild[test]:SetValue[50]
this would set it at exactly the halfway point

See Also