mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Replace XML codeblock spaces with tabs
This commit is contained in:
@@ -31,11 +31,11 @@
|
||||
Below is a sample code to help get started:
|
||||
[codeblock]
|
||||
func _is_in_input_hotzone(in_node, in_port, mouse_position):
|
||||
var port_size = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical"))
|
||||
var port_pos = in_node.get_position() + in_node.get_input_port_position(in_port) - port_size / 2
|
||||
var rect = Rect2(port_pos, port_size)
|
||||
var port_size = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical"))
|
||||
var port_pos = in_node.get_position() + in_node.get_input_port_position(in_port) - port_size / 2
|
||||
var rect = Rect2(port_pos, port_size)
|
||||
|
||||
return rect.has_point(mouse_position)
|
||||
return rect.has_point(mouse_position)
|
||||
[/codeblock]
|
||||
</description>
|
||||
</method>
|
||||
@@ -49,11 +49,11 @@
|
||||
Below is a sample code to help get started:
|
||||
[codeblock]
|
||||
func _is_in_output_hotzone(in_node, in_port, mouse_position):
|
||||
var port_size = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical"))
|
||||
var port_pos = in_node.get_position() + in_node.get_output_port_position(in_port) - port_size / 2
|
||||
var rect = Rect2(port_pos, port_size)
|
||||
var port_size = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical"))
|
||||
var port_pos = in_node.get_position() + in_node.get_output_port_position(in_port) - port_size / 2
|
||||
var rect = Rect2(port_pos, port_size)
|
||||
|
||||
return rect.has_point(mouse_position)
|
||||
return rect.has_point(mouse_position)
|
||||
[/codeblock]
|
||||
</description>
|
||||
</method>
|
||||
@@ -70,12 +70,12 @@
|
||||
[codeblocks]
|
||||
[gdscript]
|
||||
func _is_node_hover_valid(from, from_port, to, to_port):
|
||||
return from != to
|
||||
return from != to
|
||||
[/gdscript]
|
||||
[csharp]
|
||||
public override bool _IsNodeHoverValid(StringName fromNode, int fromPort, StringName toNode, int toPort)
|
||||
{
|
||||
return fromNode != toNode;
|
||||
return fromNode != toNode;
|
||||
}
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
@@ -177,11 +177,11 @@
|
||||
A connection is represented as a [Dictionary] in the form of:
|
||||
[codeblock]
|
||||
{
|
||||
from_node: StringName,
|
||||
from_port: int,
|
||||
to_node: StringName,
|
||||
to_port: int,
|
||||
keep_alive: bool
|
||||
from_node: StringName,
|
||||
from_port: int,
|
||||
to_node: StringName,
|
||||
to_port: int,
|
||||
keep_alive: bool
|
||||
}
|
||||
[/codeblock]
|
||||
For example, getting a connection at a given mouse position can be achieved like this:
|
||||
@@ -216,11 +216,11 @@
|
||||
A connection is represented as a [Dictionary] in the form of:
|
||||
[codeblock]
|
||||
{
|
||||
from_node: StringName,
|
||||
from_port: int,
|
||||
to_node: StringName,
|
||||
to_port: int,
|
||||
keep_alive: bool
|
||||
from_node: StringName,
|
||||
from_port: int,
|
||||
to_node: StringName,
|
||||
to_port: int,
|
||||
keep_alive: bool
|
||||
}
|
||||
[/codeblock]
|
||||
</description>
|
||||
@@ -233,11 +233,11 @@
|
||||
A connection is represented as a [Dictionary] in the form of:
|
||||
[codeblock]
|
||||
{
|
||||
from_node: StringName,
|
||||
from_port: int,
|
||||
to_node: StringName,
|
||||
to_port: int,
|
||||
keep_alive: bool
|
||||
from_node: StringName,
|
||||
from_port: int,
|
||||
to_node: StringName,
|
||||
to_port: int,
|
||||
keep_alive: bool
|
||||
}
|
||||
[/codeblock]
|
||||
</description>
|
||||
@@ -333,11 +333,11 @@
|
||||
A connection is represented as a [Dictionary] in the form of:
|
||||
[codeblock]
|
||||
{
|
||||
from_node: StringName,
|
||||
from_port: int,
|
||||
to_node: StringName,
|
||||
to_port: int,
|
||||
keep_alive: bool
|
||||
from_node: StringName,
|
||||
from_port: int,
|
||||
to_node: StringName,
|
||||
to_port: int,
|
||||
keep_alive: bool
|
||||
}
|
||||
[/codeblock]
|
||||
Connections with [code]keep_alive[/code] set to [code]false[/code] may be deleted automatically if invalid during a redraw.
|
||||
|
||||
Reference in New Issue
Block a user