diff options
author | Danil Alexeev <danil@alexeev.xyz> | 2023-03-03 17:42:32 +0300 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-03-13 14:42:27 +0100 |
commit | f4ea9df0f4ddfc5b46419710e0d4ff02c8b0260f (patch) | |
tree | 68550a1846cc63980301e6d4889b49c9955d1c40 /doc | |
parent | acdb1bdbd7aed6442e840074b3a5c09202be6660 (diff) |
Fix GDScript code style regarding colon
(cherry picked from commit ea5fd3d732a85029e8372425904971ad26153ff1)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/DTLSServer.xml | 4 | ||||
-rw-r--r-- | doc/classes/EditorResourceConversionPlugin.xml | 4 | ||||
-rw-r--r-- | doc/classes/GraphEdit.xml | 8 | ||||
-rw-r--r-- | doc/classes/ImageTexture.xml | 2 | ||||
-rw-r--r-- | doc/classes/UDPServer.xml | 2 | ||||
-rw-r--r-- | doc/classes/XRInterface.xml | 4 |
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() |