Abstract base class for range-based controls.
    public abstract class Range : Control

Range is a base class for Control nodes that change a floating point value between a minimum and a maximum, using step and page, for example a ScrollBar.

Inheritance Chain

Derived Classes

Signals

    "changed" ()

This signal is emitted when min, max, range or step change.

    "value_changed" (float value)

This signal is emitted when value changes.

Properties

    public bool ExpEdit { get; set; }

If true and min_value is greater than 0, value will be represented exponentially rather than linearly.

    public float MaxValue { get; set; }

Maximum value. Range is clamped if value is greater than max_value. Default value: 100.

    public float MinValue { get; set; }

Minimum value. Range is clamped if value is less than min_value. Default value: 0.

    public float Page { get; set; }

Page size. Used mainly for ScrollBar. ScrollBar’s length is its size multiplied by page over the difference between min_value and max_value.

    public float Ratio { get; set; }

The value mapped between 0 and 1.

    public bool Rounded { get; set; }

If true, value will always be rounded to the nearest integer.

    public float Step { get; set; }

If greater than 0, value will always be rounded to a multiple of step. If rounded is also true, value will first be rounded to a multiple of step then rounded to the nearest integer.

    public float Value { get; set; }

Range’s current value.

Methods

    public float GetAsRatio()

Getter for Ratio

    public float GetMax()

Getter for MaxValue

    public float GetMin()

Getter for MinValue

    public float GetPage()

Getter for Page

    public float GetStep()

Getter for Step

    public float GetValue()

Getter for Value

    public bool IsRatioExp()

Getter for ExpEdit

    public bool IsUsingRoundedValues()

Getter for Rounded

    public void SetAsRatio(float value)

Setter for Ratio

    public void SetExpRatio(bool enabled)

Setter for ExpEdit

    public void SetMax(float maximum)

Setter for MaxValue

    public void SetMin(float minimum)

Setter for MinValue

    public void SetPage(float pagesize)

Setter for Page

    public void SetStep(float step)

Setter for Step

    public void SetUseRoundedValues(bool enabled)

Setter for Rounded

    public void SetValue(float value)

Setter for Value

    public void Share(Node with)

Binds two Ranges together along with any Ranges previously grouped with either of them. When any of Range’s member variables change, it will share the new value with all other Ranges in its group.

    public void Unshare()

Stop Range from sharing its member variables with any other Range.

Tags: