LavishGUI:variablegauge (Element Type)

From Lavish Software Wiki
Jump to navigation Jump to search

Introduction

What is a Variable Gauge?

A variable gauge is a gauge that modifies data.

Using Variable Gauges

Variable Gauges are descendants of the gauge element type. Any attributes of the gauge element type may be applied in addition to the variable gauge-specific properties described below.

Variable Gauge-Specific Properties

  • Data
Complete data sequence indicating a value within the gauge's range
  • Offset
This value will be subtracted from the result of the data sequence, to force the value to within the gauge's rang

Examples

Example code

This example shows a basic variable gauge, using the value of a "test" variable. The variable uses the default gauge range of 1, so valid values are anywhere from 0 to 1, inclusive. The gauge also has a child, called "ticks", which has a range set to .1. The child gauge will basically show a zoomed view of the current interval of .1 (for example, if the value of test is .56, the child tick will show a zoomed view of between .50 and .60, with the current value 6 tenths of the way filled).

      <VariableGauge Name='test gauge'>
        ${test}
	<X>5%</X>
	<Y>5%</Y>
        <Border>5</Border>
        <Width>90%</Width>
        <Height>90%</Height>
        <Children>
          <Gauge Name='ticks'>
            <Border>1</Border>
            <Y>25%</Y>
	    <Height>50%</Height>
	    <Width>100%</Width>
            <Range>.1</Range>
          </Gauge>
        </Children>
      </VariableGauge>


See Also