Merge pull request #35396 from akien-mga/3.1

Range: Properly bind value emitted by 'changed' signal
This commit is contained in:
Rémi Verschelde 2020-01-21 10:16:25 +01:00 committed by GitHub
commit 5361dbf4f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -60,6 +60,8 @@
</members>
<signals>
<signal name="changed">
<argument index="0" name="value" type="float">
</argument>
<description>
Emitted when [member min_value], [member max_value], [member page], or [member step] change.
</description>

View file

@ -266,7 +266,7 @@ void Range::_bind_methods() {
ClassDB::bind_method(D_METHOD("unshare"), &Range::unshare);
ADD_SIGNAL(MethodInfo("value_changed", PropertyInfo(Variant::REAL, "value")));
ADD_SIGNAL(MethodInfo("changed"));
ADD_SIGNAL(MethodInfo("changed", PropertyInfo(Variant::REAL, "value")));
ADD_PROPERTY(PropertyInfo(Variant::REAL, "min_value"), "set_min", "get_min");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_value"), "set_max", "get_max");