Skip to content

Commit

Permalink
Merge pull request godotengine#22 from lawnjelly/plus_merge
Browse files Browse the repository at this point in the history
Sync with godot engine
  • Loading branch information
lawnjelly authored Apr 11, 2023
2 parents 030b3c9 + 6484599 commit 86baae4
Show file tree
Hide file tree
Showing 17 changed files with 1,221 additions and 626 deletions.
8 changes: 3 additions & 5 deletions core/variant_call.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1103,11 +1103,8 @@ struct _VariantCall {
}

static void Color_init3(Variant &r_ret, const Variant **p_args) {
r_ret = Color::html(*p_args[0]);
}

static void Color_init4(Variant &r_ret, const Variant **p_args) {
r_ret = Color::hex(*p_args[0]);
Color c = *p_args[0];
r_ret = Color(c.r, c.g, c.b, *p_args[1]);
}

static void AABB_init1(Variant &r_ret, const Variant **p_args) {
Expand Down Expand Up @@ -2212,6 +2209,7 @@ void register_variant_methods() {

_VariantCall::add_constructor(_VariantCall::Color_init1, Variant::COLOR, "r", Variant::REAL, "g", Variant::REAL, "b", Variant::REAL, "a", Variant::REAL);
_VariantCall::add_constructor(_VariantCall::Color_init2, Variant::COLOR, "r", Variant::REAL, "g", Variant::REAL, "b", Variant::REAL);
_VariantCall::add_constructor(_VariantCall::Color_init3, Variant::COLOR, "from", Variant::COLOR, "alpha", Variant::REAL);

_VariantCall::add_constructor(_VariantCall::AABB_init1, Variant::AABB, "position", Variant::VECTOR3, "size", Variant::VECTOR3);

Expand Down
11 changes: 11 additions & 0 deletions doc/classes/Color.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,17 @@
[/codeblock]
</description>
</method>
<method name="Color">
<return type="Color" />
<argument index="0" name="from" type="Color" />
<argument index="1" name="alpha" type="float" />
<description>
Constructs a color from the existing color, with [member a] set to the given [code]alpha[/code] value.
[codeblock]
var red = Color(Color.red, 0.2) # 20% opaque red.
[/codeblock]
</description>
</method>
<method name="Color">
<return type="Color" />
<argument index="0" name="r" type="float" />
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/EditorSettings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@
</member>
<member name="text_editor/indent/type" type="int" setter="" getter="">
The indentation style to use (tabs or spaces).
[b]Note:[/b] The [url=$DOCS_URL/getting_started/scripting/gdscript/gdscript_styleguide.html]GDScript style guide[/url] recommends using tabs for indentation. It is advised to change this setting only if you need to work on a project that currently uses spaces for indentation.
[b]Note:[/b] The [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_styleguide.html]GDScript style guide[/url] recommends using tabs for indentation. It is advised to change this setting only if you need to work on a project that currently uses spaces for indentation.
</member>
<member name="text_editor/navigation/drag_and_drop_selection" type="bool" setter="" getter="">
If [code]true[/code], allows drag-and-dropping text in the script editor to move text. Disable this if you find yourself accidentally drag-and-dropping text in the script editor.
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/OS.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,7 @@
The minimum size of the window in pixels (without counting window manager decorations). Does not affect fullscreen mode. Set to [code](0, 0)[/code] to reset to the system's default value.
[b]Note:[/b] By default, the project window has a minimum size of [code]Vector2(64, 64)[/code]. This prevents issues that can arise when the window is resized to a near-zero size.
</member>
<member name="screen_orientation" type="int" setter="set_screen_orientation" getter="get_screen_orientation" enum="_OS.ScreenOrientation" default="0">
<member name="screen_orientation" type="int" setter="set_screen_orientation" getter="get_screen_orientation" enum="OS.ScreenOrientation" default="0">
The current screen orientation.
</member>
<member name="tablet_driver" type="String" setter="set_current_tablet_driver" getter="get_current_tablet_driver" default="&quot;&quot;">
Expand Down
9 changes: 8 additions & 1 deletion doc/classes/Range.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
<tutorials>
</tutorials>
<methods>
<method name="set_value_no_signal">
<return type="void" />
<argument index="0" name="value" type="float" />
<description>
Sets the [Range]'s current value to the specified [member value], without emitting the [signal value_changed] signal.
</description>
</method>
<method name="share">
<return type="void" />
<argument index="0" name="with" type="Node" />
Expand Down Expand Up @@ -52,7 +59,7 @@
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.
</member>
<member name="value" type="float" setter="set_value" getter="get_value" default="0.0">
Range's current value.
Range's current value. Changing this property (even via code) will trigger [signal value_changed] signal. Use [method set_value_no_signal] if you want to avoid it.
</member>
</members>
<signals>
Expand Down
Loading

0 comments on commit 86baae4

Please sign in to comment.