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


    "changed" ()

Emitted when MinValue, MaxValue, Page, or Step change.

    "value_changed" (float value)

Emitted when Value changes.


    public bool AllowGreater { get; set; }

If true, Value may be greater than MaxValue. Default value: false.

    public bool AllowLesser { get; set; }

If true, Value may be less than MinValue. Default value: false.

    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. Default value: false.

    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.


    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 IsGreaterAllowed()

Getter for AllowGreater

    public bool IsLesserAllowed()

Getter for AllowLesser

    public bool IsRatioExp()

Getter for ExpEdit

    public bool IsUsingRoundedValues()

Getter for Rounded

    public void SetAllowGreater(bool allow)

Setter for AllowGreater

    public void SetAllowLesser(bool allow)

Setter for AllowLesser

    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.