mirror of
https://github.com/godotengine/godot
synced 2024-09-05 18:39:21 +00:00
Fix bindings of EditorSettings.set_initial_value
Also ran doctool.
This commit is contained in:
parent
29ae3e5f33
commit
52165fa12d
|
@ -126,6 +126,8 @@
|
|||
</argument>
|
||||
<argument index="1" name="value" type="Variant">
|
||||
</argument>
|
||||
<argument index="2" name="update_current" type="bool">
|
||||
</argument>
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="VehicleBody" inherits="PhysicsBody" category="Core" version="3.0-beta">
|
||||
<class name="VehicleBody" inherits="RigidBody" category="Core" version="3.0-beta">
|
||||
<brief_description>
|
||||
</brief_description>
|
||||
<description>
|
||||
|
@ -9,27 +9,12 @@
|
|||
<demos>
|
||||
</demos>
|
||||
<methods>
|
||||
<method name="get_linear_velocity" qualifiers="const">
|
||||
<return type="Vector3">
|
||||
</return>
|
||||
<description>
|
||||
Returns the VehicleBody's velocity vector. To get the absolute speed in scalar value, get the length of the return vector in pixels/second. Example:
|
||||
[codeblock]
|
||||
# vehicle is an instance of VehicleBody
|
||||
var speed = vehicle.get_linear_velocity().length()
|
||||
[/codeblock]
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="brake" type="float" setter="set_brake" getter="get_brake">
|
||||
</member>
|
||||
<member name="engine_force" type="float" setter="set_engine_force" getter="get_engine_force">
|
||||
</member>
|
||||
<member name="friction" type="float" setter="set_friction" getter="get_friction">
|
||||
</member>
|
||||
<member name="mass" type="float" setter="set_mass" getter="get_mass">
|
||||
</member>
|
||||
<member name="steering" type="float" setter="set_steering" getter="get_steering">
|
||||
</member>
|
||||
</members>
|
||||
|
|
|
@ -992,7 +992,7 @@ void EditorSettings::raise_order(const String &p_setting) {
|
|||
props[p_setting].order = ++last_order;
|
||||
}
|
||||
|
||||
void EditorSettings::set_initial_value(const StringName &p_setting, const Variant &p_value, bool update_current) {
|
||||
void EditorSettings::set_initial_value(const StringName &p_setting, const Variant &p_value, bool p_update_current) {
|
||||
|
||||
_THREAD_SAFE_METHOD_
|
||||
|
||||
|
@ -1000,7 +1000,7 @@ void EditorSettings::set_initial_value(const StringName &p_setting, const Varian
|
|||
return;
|
||||
props[p_setting].initial = p_value;
|
||||
props[p_setting].has_default_value = true;
|
||||
if (update_current) {
|
||||
if (p_update_current) {
|
||||
set(p_setting, p_value);
|
||||
}
|
||||
}
|
||||
|
@ -1436,7 +1436,7 @@ void EditorSettings::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("set_setting", "name", "value"), &EditorSettings::set_setting);
|
||||
ClassDB::bind_method(D_METHOD("get_setting", "name"), &EditorSettings::get_setting);
|
||||
ClassDB::bind_method(D_METHOD("erase", "property"), &EditorSettings::erase);
|
||||
ClassDB::bind_method(D_METHOD("set_initial_value", "name", "value"), &EditorSettings::set_initial_value);
|
||||
ClassDB::bind_method(D_METHOD("set_initial_value", "name", "value", "update_current"), &EditorSettings::set_initial_value);
|
||||
ClassDB::bind_method(D_METHOD("property_can_revert", "name"), &EditorSettings::property_can_revert);
|
||||
ClassDB::bind_method(D_METHOD("property_get_revert", "name"), &EditorSettings::property_get_revert);
|
||||
ClassDB::bind_method(D_METHOD("add_property_info", "info"), &EditorSettings::_add_property_info_bind);
|
||||
|
|
Loading…
Reference in a new issue