2017-09-12 22:42:36 +02:00
<?xml version="1.0" encoding="UTF-8" ?>
2018-07-31 20:13:10 +02:00
<class name= "Range" inherits= "Control" category= "Core" version= "3.0.7" >
2017-09-12 22:42:36 +02:00
<brief_description >
Abstract base class for range-based controls.
</brief_description>
<description >
Range is a base class for [Control] nodes that change a floating point [i]value[/i] between a [i]minimum[/i] and a [i]maximum[/i], using [i]step[/i] and [i]page[/i], for example a [ScrollBar].
</description>
<tutorials >
</tutorials>
<demos >
</demos>
<methods >
<method name= "share" >
<return type= "void" >
</return>
<argument index= "0" name= "with" type= "Node" >
</argument>
<description >
2018-08-19 06:29:12 +02:00
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.
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "unshare" >
<return type= "void" >
</return>
<description >
2018-08-19 06:29:12 +02:00
Stop range from sharing its member variables with any other.
2017-09-12 22:42:36 +02:00
</description>
</method>
</methods>
<members >
2017-09-13 08:49:40 +02:00
<member name= "exp_edit" type= "bool" setter= "set_exp_ratio" getter= "is_ratio_exp" >
2017-09-24 01:27:45 +02:00
If [code]true[/code] and [code]min_value[/code] is greater than 0, [code]value[/code] will be represented exponentially rather than linearly.
2017-09-12 22:42:36 +02:00
</member>
2017-09-13 08:49:40 +02:00
<member name= "max_value" type= "float" setter= "set_max" getter= "get_max" >
2018-08-19 06:29:12 +02:00
Maximum value. Range is clamped if [code]value[/code] is greater than [code]max_value[/code]. Default value: [code]100[/code].
2017-09-12 22:42:36 +02:00
</member>
2017-09-13 08:49:40 +02:00
<member name= "min_value" type= "float" setter= "set_min" getter= "get_min" >
2018-08-19 06:29:12 +02:00
Minimum value. Range is clamped if [code]value[/code] is less than [code]min_value[/code]. Default value: [code]0[/code].
2017-09-12 22:42:36 +02:00
</member>
2017-09-13 08:49:40 +02:00
<member name= "page" type= "float" setter= "set_page" getter= "get_page" >
2017-09-24 01:27:45 +02:00
Page size. Used mainly for [ScrollBar]. ScrollBar's length is its size multiplied by [code]page[/code] over the difference between [code]min_value[/code] and [code]max_value[/code].
2017-09-12 22:42:36 +02:00
</member>
2018-01-11 23:38:35 +01:00
<member name= "ratio" type= "float" setter= "set_as_ratio" getter= "get_as_ratio" >
The value mapped between 0 and 1.
</member>
2017-09-13 08:49:40 +02:00
<member name= "rounded" type= "bool" setter= "set_use_rounded_values" getter= "is_using_rounded_values" >
2018-08-19 06:29:12 +02:00
If [code]true[/code] [code]value[/code] will always be rounded to the nearest integer. Default value: [code]false[/code].
2017-09-12 22:42:36 +02:00
</member>
2017-09-13 08:49:40 +02:00
<member name= "step" type= "float" setter= "set_step" getter= "get_step" >
2017-09-24 01:27:45 +02:00
If greater than 0, [code]value[/code] will always be rounded to a multiple of [code]step[/code]. If [code]rounded[/code] is also [code]true[/code], [code]value[/code] will first be rounded to a multiple of [code]step[/code] then rounded to the nearest integer.
2017-09-12 22:42:36 +02:00
</member>
2017-09-13 08:49:40 +02:00
<member name= "value" type= "float" setter= "set_value" getter= "get_value" >
2017-09-24 01:27:45 +02:00
Range's current value.
2017-09-12 22:42:36 +02:00
</member>
</members>
<signals >
<signal name= "changed" >
<description >
2018-08-19 06:29:12 +02:00
Emitted when [member min_value], [member max_value], [member page], or [member step] change.
2017-09-12 22:42:36 +02:00
</description>
</signal>
<signal name= "value_changed" >
<argument index= "0" name= "value" type= "float" >
</argument>
<description >
2018-08-19 06:29:12 +02:00
Emitted when [member value] changes.
2017-09-12 22:42:36 +02:00
</description>
</signal>
</signals>
<constants >
</constants>
</class>