Range

    Inherited By: , ProgressBar, , Slider, , TextureProgress

    Abstract base class for range-based controls.

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

    Properties

    void ( Node with )
    void ( )

    Signals

    Emitted when min_value, , page, or change.


    • value_changed ( float value )

    Emitted when changes.

    Defaultfalse
    Setterset_allow_greater(value)
    Getteris_greater_allowed()

    • allow_lesser
    Defaultfalse
    Setterset_allow_lesser(value)
    Getteris_lesser_allowed()

    If , value may be less than .


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


    • max_value
    Default100.0
    Setterset_max(value)
    Getterget_max()

    Maximum value. Range is clamped if value is greater than max_value.


    Default0.0
    Setterset_min(value)
    Getterget_min()

    Minimum value. Range is clamped if value is less than min_value.


    Default0.0
    Setterset_page(value)
    Getterget_page()

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



    • rounded
    Defaultfalse
    Setterset_use_rounded_values(value)
    Getteris_using_rounded_values()

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


    Default1.0
    Setterset_step(value)
    Getterget_step()

    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 then rounded to the nearest integer.


    • value
    Default0.0
    Setterset_value(value)
    Getterget_value()

    Range’s current value.

    Method Descriptions

    • 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.


    • void unshare ( )

    Stops range from sharing its member variables with any other.