CWinCtrlMeter

Script: METER

This is the control to display a meter.

You can use this as a progress bar.

As with TEXTURE , it is possible to display up to 8 images on top of each other.

You can stretch any texture parts.

If the length is set to 1, it display same look as TEXTURE .

Callbacks arriving at :class:`CWindowBase<CWindowBase>`

class CWinCtrlMeter

Functions / Properties

Single meter (Int32 index)
Param int index

Texture part number

Return float

meter’s length

Gets the percentage of the original size that the specified a texture part.

It returns a value in the range of 0 … 1.

By default, this is set to 1 (status of the meter at the max).

void setMeter (Int32 index, Single value, Single speed = 0.2f)
Param int index

Texture part number

Param float value

meter’s length(0 … 1)

Param float speed = 0.2f

animation speed

Changes the size of the specified texture part with animation.

Example of use

// get control
CWinCtrlMeter  mtrLoading = find(METER_Loading) as CWinCtrlMeter;

// Get Meter Position (0 … 1.)
float pos = mtrLoading.meter(3);

// Set 3rd texture part stretch (It can be specified as 0 … 1.)
mtrLoading.setMeter(3,0.5f);