summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/DTLSServer.xml4
-rw-r--r--doc/classes/EditorResourceConversionPlugin.xml4
-rw-r--r--doc/classes/GraphEdit.xml8
-rw-r--r--doc/classes/ImageTexture.xml2
-rw-r--r--doc/classes/UDPServer.xml2
-rw-r--r--doc/classes/XRInterface.xml4
6 files changed, 12 insertions, 12 deletions
diff --git a/doc/classes/DTLSServer.xml b/doc/classes/DTLSServer.xml
index ae1ba10ec7..3e91780095 100644
--- a/doc/classes/DTLSServer.xml
+++ b/doc/classes/DTLSServer.xml
@@ -23,8 +23,8 @@
func _process(delta):
while server.is_connection_available():
- var peer : PacketPeerUDP = server.take_connection()
- var dtls_peer : PacketPeerDTLS = dtls.take_connection(peer)
+ var peer: PacketPeerUDP = server.take_connection()
+ var dtls_peer: PacketPeerDTLS = dtls.take_connection(peer)
if dtls_peer.get_status() != PacketPeerDTLS.STATUS_HANDSHAKING:
continue # It is normal that 50% of the connections fails due to cookie exchange.
print("Peer connected!")
diff --git a/doc/classes/EditorResourceConversionPlugin.xml b/doc/classes/EditorResourceConversionPlugin.xml
index 6bdfbbe40c..7d125d731c 100644
--- a/doc/classes/EditorResourceConversionPlugin.xml
+++ b/doc/classes/EditorResourceConversionPlugin.xml
@@ -10,13 +10,13 @@
[gdscript]
extends EditorResourceConversionPlugin
- func _handles(resource : Resource):
+ func _handles(resource: Resource):
return resource is ImageTexture
func _converts_to():
return "PortableCompressedTexture2D"
- func _convert(itex : Resource):
+ func _convert(itex: Resource):
var ptex = PortableCompressedTexture2D.new()
ptex.create_from_image(itex.get_image(), PortableCompressedTexture2D.COMPRESSION_MODE_LOSSLESS)
return ptex
diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml
index bf8567751e..0cc3281236 100644
--- a/doc/classes/GraphEdit.xml
+++ b/doc/classes/GraphEdit.xml
@@ -31,8 +31,8 @@
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 = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical"))
- var port_pos : Vector2 = in_node.get_position() + in_node.get_connection_input_position(in_port) - port_size / 2
+ var port_size: Vector2 = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical"))
+ var port_pos: Vector2 = in_node.get_position() + in_node.get_connection_input_position(in_port) - port_size / 2
var rect = Rect2(port_pos, port_size)
return rect.has_point(mouse_position)
@@ -49,8 +49,8 @@
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 = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical"))
- var port_pos : Vector2 = in_node.get_position() + in_node.get_connection_output_position(in_port) - port_size / 2
+ var port_size: Vector2 = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical"))
+ var port_pos: Vector2 = in_node.get_position() + in_node.get_connection_output_position(in_port) - port_size / 2
var rect = Rect2(port_pos, port_size)
return rect.has_point(mouse_position)
diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml
index 03d1947475..7248861cf7 100644
--- a/doc/classes/ImageTexture.xml
+++ b/doc/classes/ImageTexture.xml
@@ -20,7 +20,7 @@
[b]Note:[/b] The image can be retrieved from an imported texture using the [method Texture2D.get_image] method, which returns a copy of the image:
[codeblock]
var texture = load("res://icon.svg")
- var image : Image = texture.get_image()
+ var image: Image = texture.get_image()
[/codeblock]
An [ImageTexture] is not meant to be operated from within the editor interface directly, and is mostly useful for rendering images on screen dynamically via code. If you need to generate images procedurally from within the editor, consider saving and importing images as custom texture resources implementing a new [EditorImportPlugin].
[b]Note:[/b] The maximum texture size is 16384×16384 pixels due to graphics hardware limitations.
diff --git a/doc/classes/UDPServer.xml b/doc/classes/UDPServer.xml
index 8151ecb625..60d1986bee 100644
--- a/doc/classes/UDPServer.xml
+++ b/doc/classes/UDPServer.xml
@@ -22,7 +22,7 @@
func _process(delta):
server.poll() # Important!
if server.is_connection_available():
- var peer : PacketPeerUDP = server.take_connection()
+ var peer: PacketPeerUDP = server.take_connection()
var packet = peer.get_packet()
print("Accepted peer: %s:%s" % [peer.get_packet_ip(), peer.get_packet_port()])
print("Received data: %s" % [packet.get_string_from_utf8()])
diff --git a/doc/classes/XRInterface.xml b/doc/classes/XRInterface.xml
index cdada35970..96a6f5decd 100644
--- a/doc/classes/XRInterface.xml
+++ b/doc/classes/XRInterface.xml
@@ -116,9 +116,9 @@
[b]Note:[/b] Not all runtimes support all environment blend modes, so it is important to check this at startup. For example:
[codeblock]
func _ready():
- var xr_interface : XRInterface = XRServer.find_interface("OpenXR")
+ var xr_interface: XRInterface = XRServer.find_interface("OpenXR")
if xr_interface and xr_interface.is_initialized():
- var vp : Viewport = get_viewport()
+ var vp: Viewport = get_viewport()
vp.use_xr = true
var acceptable_modes = [ XRInterface.XR_ENV_BLEND_MODE_OPAQUE, XRInterface.XR_ENV_BLEND_MODE_ADDITIVE ]
var modes = xr_interface.get_supported_environment_blend_modes()