diff options
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/InputMap.xml | 1 | ||||
-rw-r--r-- | doc/classes/NativeExtension.xml | 4 | ||||
-rw-r--r-- | doc/classes/OS.xml | 9 | ||||
-rw-r--r-- | doc/classes/Viewport.xml | 17 |
4 files changed, 17 insertions, 14 deletions
diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml index 61d54e85f8..eb708432b4 100644 --- a/doc/classes/InputMap.xml +++ b/doc/classes/InputMap.xml @@ -45,6 +45,7 @@ <argument index="0" name="action" type="StringName" /> <description> Returns an array of [InputEvent]s associated with a given action. + [b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), this method will return events for the editor action. If you want to access your project's input binds from the editor, read the [code]input/*[/code] settings from [ProjectSettings]. </description> </method> <method name="action_has_event"> diff --git a/doc/classes/NativeExtension.xml b/doc/classes/NativeExtension.xml index ccdbb617ab..e5e11c1c95 100644 --- a/doc/classes/NativeExtension.xml +++ b/doc/classes/NativeExtension.xml @@ -43,9 +43,7 @@ </constant> <constant name="INITIALIZATION_LEVEL_SCENE" value="2" enum="InitializationLevel"> </constant> - <constant name="INITIALIZATION_LEVEL_DRIVER" value="3" enum="InitializationLevel"> - </constant> - <constant name="INITIALIZATION_LEVEL_EDITOR" value="4" enum="InitializationLevel"> + <constant name="INITIALIZATION_LEVEL_EDITOR" value="3" enum="InitializationLevel"> </constant> </constants> </class> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index f45bee4db4..266a2573de 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -434,6 +434,15 @@ Returns [code]true[/code] if the input keycode corresponds to a Unicode character. </description> </method> + <method name="is_process_running" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="pid" type="int" /> + <description> + Returns [code]true[/code] if the child process ID ([code]pid[/code]) is still running or [code]false[/code] if it has terminated. + Must be a valid ID generated from [method create_process]. + [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows. + </description> + </method> <method name="is_stdout_verbose" qualifiers="const"> <return type="bool" /> <description> diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index ce466b2d0f..148c6d7064 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -75,17 +75,12 @@ <return type="ViewportTexture" /> <description> Returns the viewport's texture. - [b]Note:[/b] Due to the way OpenGL works, the resulting [ViewportTexture] is flipped vertically. You can use [method Image.flip_y] on the result of [method Texture2D.get_image] to flip it back, for example: - [codeblocks] - [gdscript] - var img = get_viewport().get_texture().get_image() - img.flip_y() - [/gdscript] - [csharp] - Image img = GetViewport().GetTexture().GetImage(); - img.FlipY(); - [/csharp] - [/codeblocks] + [b]Note:[/b] When trying to store the current texture (e.g. in a file), it might be completely black or outdated if used too early, especially when used in e.g. [method Node._ready]. To make sure the texture you get is correct, you can await [signal RenderingServer.frame_post_draw] signal. + [codeblock] + func _ready(): + await RenderingServer.frame_post_draw + $Viewport.get_texture().get_image().save_png("user://Screenshot.png") + [/codeblock] </description> </method> <method name="get_viewport_rid" qualifiers="const"> |