diff options
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/@GDScript.xml | 5 | ||||
-rw-r--r-- | doc/classes/Array.xml | 11 | ||||
-rw-r--r-- | doc/classes/ColorPicker.xml | 3 | ||||
-rw-r--r-- | doc/classes/ConfigFile.xml | 2 | ||||
-rw-r--r-- | doc/classes/CylinderShape.xml | 25 | ||||
-rw-r--r-- | doc/classes/EditorPlugin.xml | 7 | ||||
-rw-r--r-- | doc/classes/EditorScenePostImport.xml | 38 | ||||
-rw-r--r-- | doc/classes/Image.xml | 15 | ||||
-rw-r--r-- | doc/classes/Line2D.xml | 3 | ||||
-rw-r--r-- | doc/classes/PhysicsServer.xml | 11 | ||||
-rw-r--r-- | doc/classes/PopupMenu.xml | 3 | ||||
-rw-r--r-- | doc/classes/PrismMesh.xml | 2 | ||||
-rw-r--r-- | doc/classes/ScriptCreateDialog.xml | 45 | ||||
-rw-r--r-- | doc/classes/Slider.xml | 2 | ||||
-rw-r--r-- | doc/classes/SpriteFrames.xml | 9 | ||||
-rw-r--r-- | doc/classes/TextEdit.xml | 31 | ||||
-rw-r--r-- | doc/classes/Texture.xml | 1 | ||||
-rw-r--r-- | doc/classes/TileMap.xml | 11 | ||||
-rw-r--r-- | doc/classes/Vector2.xml | 1 | ||||
-rw-r--r-- | doc/classes/Vector3.xml | 1 |
20 files changed, 215 insertions, 11 deletions
diff --git a/doc/classes/@GDScript.xml b/doc/classes/@GDScript.xml index a4ca830d4d..b5f5fed3f9 100644 --- a/doc/classes/@GDScript.xml +++ b/doc/classes/@GDScript.xml @@ -1145,8 +1145,9 @@ <argument index="1" name="signal" type="String" default=""""> </argument> <description> - Stops the function execution and returns the current state. Call [method GDScriptFunctionState.resume] on the state to resume execution. This invalidates the state. - Returns anything that was passed to the resume function call. If passed an object and a signal, the execution is resumed when the object's signal is emitted. + Stops the function execution and returns the current suspended state to the calling function. + From the caller, call [method GDScriptFunctionState.resume] on the state to resume execution. This invalidates the state. Within the resumed function, [code]yield()[/code] returns whatever was passed to the [code]resume()[/code] function call. + If passed an object and a signal, the execution is resumed when the object emits the given signal. In this case, [code]yield()[/code] returns the argument passed to [code]emit_signal()[/code] if the signal takes only one argument, or an array containing all the arguments passed to [code]emit_signal()[/code] if the signal takes multiple arguments. </description> </method> </methods> diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index 35c120cd6a..7fcb827252 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -4,7 +4,16 @@ Generic array datatype. </brief_description> <description> - Generic array, contains several elements of any type, accessible by numerical index starting at 0. Negative indices can be used to count from the right, like in Python. Arrays are always passed by reference. + Generic array, contains several elements of any type, accessible by a numerical index starting at 0. Negative indices can be used to count from the back, like in Python (-1 is the last element, -2 the second to last, etc.). Example: + [codeblock] + var array = ["One", 2, 3, "Four"] + print(array[0]) # One + print(array[2]) # 3 + print(array[-1]) # Four + array[2] = "Three" + print(array[-2]) # Three + [/codeblock] + Arrays are always passed by reference. </description> <tutorials> </tutorials> diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml index 2214264dca..1bd902c20e 100644 --- a/doc/classes/ColorPicker.xml +++ b/doc/classes/ColorPicker.xml @@ -31,6 +31,9 @@ <member name="raw_mode" type="bool" setter="set_raw_mode" getter="is_raw_mode"> If [code]true[/code], allows the color R, G, B component values to go beyond 1.0, which can be used for certain special operations that require it (like tinting without darkening or rendering sprites in HDR). </member> + <member name="deferred_mode" type="bool" setter="set_deferred_mode" getter="is_deferred_mode"> + If [code]true[/code], the color will apply only after user releases mouse button, otherwise it will apply immediatly even in mouse motion event (which can cause performance issues). + </member> </members> <signals> <signal name="color_changed"> diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml index a42d0f196e..ec0381bda5 100644 --- a/doc/classes/ConfigFile.xml +++ b/doc/classes/ConfigFile.xml @@ -117,7 +117,7 @@ <argument index="2" name="value" type="Variant"> </argument> <description> - Assigns a value to the specified key of the the specified section. If the section and/or the key do not exist, they are created. Passing a [code]null[/code] value deletes the specified key if it exists, and deletes the section if it ends up empty once the key has been removed. + Assigns a value to the specified key of the specified section. If the section and/or the key do not exist, they are created. Passing a [code]null[/code] value deletes the specified key if it exists, and deletes the section if it ends up empty once the key has been removed. </description> </method> </methods> diff --git a/doc/classes/CylinderShape.xml b/doc/classes/CylinderShape.xml new file mode 100644 index 0000000000..a63cc8831e --- /dev/null +++ b/doc/classes/CylinderShape.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="CylinderShape" inherits="Shape" category="Core" version="3.1"> + <brief_description> + Cylinder shape for collisions. + </brief_description> + <description> + Cylinder shape for collisions. + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + </methods> + <members> + <member name="height" type="float" setter="set_height" getter="get_height"> + The cylinder's height. + </member> + <member name="radius" type="float" setter="set_radius" getter="get_radius"> + The cylinder's radius. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index b9945f3f73..f5fbf8e313 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -235,6 +235,13 @@ <description> </description> </method> + <method name="get_script_create_dialog"> + <return type="ScriptCreateDialog"> + </return> + <description> + Gets the Editor's dialogue used for making scripts. Note that users can configure it before use. + </description> + </method> <method name="get_state" qualifiers="virtual"> <return type="Dictionary"> </return> diff --git a/doc/classes/EditorScenePostImport.xml b/doc/classes/EditorScenePostImport.xml index 664ea33dd6..f95c26c2b0 100644 --- a/doc/classes/EditorScenePostImport.xml +++ b/doc/classes/EditorScenePostImport.xml @@ -1,20 +1,56 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="EditorScenePostImport" inherits="Reference" category="Core" version="3.1"> <brief_description> + Post process scenes after import </brief_description> <description> + The imported scene can be automatically modified right after import by specifying a 'custom script' that inherits from this class. The [method post_import]-method receives the imported scene's root-node and returns the modified version of the scene </description> <tutorials> + http://docs.godotengine.org/en/latest/learning/workflow/assets/importing_scenes.html?highlight=post%20import </tutorials> <demos> + [codeblock] +tool # needed so it runs in editor +extends EditorScenePostImport + +# This sample changes all node names + +# get called right after the scene is imported and gets the root-node +func post_import(scene): + # change all node names to "modified_[oldnodename]" + iterate(scene) + return scene # remember to return the imported scene + +func iterate(node): + if node!=null: + node.name = "modified_"+node.name + for child in node.get_children(): + iterate(child) +[/codeblock] </demos> <methods> + <method name="get_source_file" qualifiers="const"> + <return type="String"> + </return> + <description> + Returns the source-file-path which got imported (e.g. [code]res://scene.dae[/code] ) + </description> + </method> + <method name="get_source_folder" qualifiers="const"> + <return type="String"> + </return> + <description> + Returns the resource-folder the imported scene-file is located in + </description> + </method> <method name="post_import" qualifiers="virtual"> - <return type="void"> + <return type="Object"> </return> <argument index="0" name="scene" type="Object"> </argument> <description> + Gets called after the scene got imported and has to return the modified version of the scene </description> </method> </methods> diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index 9fc7672a80..55693bd49c 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -350,6 +350,15 @@ Loads an image from the binary contents of a PNG file. </description> </method> + <method name="load_webp_from_buffer"> + <return type="int" enum="Error"> + </return> + <argument index="0" name="buffer" type="PoolByteArray"> + </argument> + <description> + Loads an image from the binary contents of a WebP file. + </description> + </method> <method name="lock"> <return type="void"> </return> @@ -584,6 +593,12 @@ </constant> <constant name="INTERPOLATE_CUBIC" value="2" enum="Interpolation"> </constant> + <constant name="INTERPOLATE_TRILINEAR" value="3" enum="Interpolation"> + Performs bilinear separately on the two most suited mipmap levels, then linearly interpolates between them. + It's slower than [code]INTERPOLATE_BILINEAR[/code], but produces higher quality results, with much less aliasing artifacts. + If the image does not have mipmaps, they will be generated and used internally, but no mipmaps will be generated on the resulting image. (Note that if you intend to scale multiple copies of the original image, it's better to call [code]generate_mipmaps[/code] on it in advance, to avoid wasting processing power in generating them again and again.) + On the other hand, if the image already has mipmaps, they will be used, and a new set will be generated for the resulting image. + </constant> <constant name="ALPHA_NONE" value="0" enum="AlphaMode"> </constant> <constant name="ALPHA_BIT" value="1" enum="AlphaMode"> diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml index 19be34978d..c1682e71e5 100644 --- a/doc/classes/Line2D.xml +++ b/doc/classes/Line2D.xml @@ -117,5 +117,8 @@ <constant name="LINE_TEXTURE_TILE" value="1" enum="LineTextureMode"> Tiles the texture over the line. The texture need to be imported with Repeat Enabled for it to work properly. </constant> + <constant name="LINE_TEXTURE_STRETCH" value="2" enum="LineTextureMode"> + Stretches the texture across the line. Import the texture with Repeat Disabled for best results. + </constant> </constants> </class> diff --git a/doc/classes/PhysicsServer.xml b/doc/classes/PhysicsServer.xml index 6efbfdb519..d45a3adc9c 100644 --- a/doc/classes/PhysicsServer.xml +++ b/doc/classes/PhysicsServer.xml @@ -1413,16 +1413,19 @@ <constant name="SHAPE_CAPSULE" value="4" enum="ShapeType"> The [Shape] is a [CapsuleShape]. </constant> - <constant name="SHAPE_CONVEX_POLYGON" value="5" enum="ShapeType"> + <constant name="SHAPE_CYLINDER" value="5" enum="ShapeType"> + The [Shape] is a [CylinderShape]. + </constant> + <constant name="SHAPE_CONVEX_POLYGON" value="6" enum="ShapeType"> The [Shape] is a [ConvexPolygonShape]. </constant> - <constant name="SHAPE_CONCAVE_POLYGON" value="6" enum="ShapeType"> + <constant name="SHAPE_CONCAVE_POLYGON" value="7" enum="ShapeType"> The [Shape] is a [ConcavePolygonShape]. </constant> - <constant name="SHAPE_HEIGHTMAP" value="7" enum="ShapeType"> + <constant name="SHAPE_HEIGHTMAP" value="8" enum="ShapeType"> The [Shape] is a [HeightMapShape]. </constant> - <constant name="SHAPE_CUSTOM" value="8" enum="ShapeType"> + <constant name="SHAPE_CUSTOM" value="9" enum="ShapeType"> This constant is used internally by the engine. Any attempt to create this kind of shape results in an error. </constant> <constant name="AREA_PARAM_GRAVITY" value="0" enum="AreaParameter"> diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index 89d8c43c00..83d1246e2a 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -507,6 +507,9 @@ </member> <member name="hide_on_state_item_selection" type="bool" setter="set_hide_on_state_item_selection" getter="is_hide_on_state_item_selection"> </member> + <member name="submenu_popup_delay" type="real" setter="set_submenu_popup_delay" getter="get_submenu_popup_delay"> + Sets the delay time for the submenu item to popup on mouse hovering. If the popup menu is added as a child of another (acting as a submenu), it will inherit the delay time of the parent menu item. Default value: [code]0.3[/code] seconds. + </member> </members> <signals> <signal name="id_focused"> diff --git a/doc/classes/PrismMesh.xml b/doc/classes/PrismMesh.xml index 268395c37a..11815d299b 100644 --- a/doc/classes/PrismMesh.xml +++ b/doc/classes/PrismMesh.xml @@ -14,7 +14,7 @@ </methods> <members> <member name="left_to_right" type="float" setter="set_left_to_right" getter="get_left_to_right"> - Displacement of of the upper edge along the x-axis. 0.0 positions edge straight above the bottome left edge. Defaults to 0.5 (positioned on the midpoint). + Displacement of the upper edge along the x-axis. 0.0 positions edge straight above the bottome left edge. Defaults to 0.5 (positioned on the midpoint). </member> <member name="size" type="Vector3" setter="set_size" getter="get_size"> Size of the prism. Defaults to (2.0, 2.0, 2.0). diff --git a/doc/classes/ScriptCreateDialog.xml b/doc/classes/ScriptCreateDialog.xml new file mode 100644 index 0000000000..f09d282026 --- /dev/null +++ b/doc/classes/ScriptCreateDialog.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="ScriptCreateDialog" inherits="ConfirmationDialog" category="Core" version="3.1"> + <brief_description> + The Editor's popup dialog for creating new [Script] files. + </brief_description> + <description> + The ScriptCreateDialog creates script files according to a given template for a given scripting language. The standard use is to configure its fields prior to calling a [method popup]() method. + [codeblock] + func _ready(): + dialog.config("Node", "res://new_node.gd") # for in-engine types + dialog.config("\"res://base_node.gd\"", "res://derived_node.gd") # for script types + dialog.popup_centered() + [/codeblock] + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + <method name="config"> + <return type="void"> + </return> + <argument index="0" name="inherits" type="String"> + The dialog's "Inherits" field content. + </argument> + <argument index="1" name="path" type="String"> + The dialog's "Path" field content. + </argument> + <description> + Prefills required fields to configure the ScriptCreateDialog for use. + </description> + </method> + </methods> + <signals> + <signal name="script_created"> + <argument index="0" name="script" type="Object"> + </argument> + <description> + Emitted when the user clicks the OK button. + </description> + </signal> + </signals> + <constants> + </constants> +</class> diff --git a/doc/classes/Slider.xml b/doc/classes/Slider.xml index 554842b50e..a0ab4fe878 100644 --- a/doc/classes/Slider.xml +++ b/doc/classes/Slider.xml @@ -15,6 +15,8 @@ <members> <member name="editable" type="bool" setter="set_editable" getter="is_editable"> </member> + <member name="scrollable" type="bool" setter="set_scrollable" getter="is_scrollable"> + </member> <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" enum="Control.FocusMode"> </member> <member name="tick_count" type="int" setter="set_ticks" getter="get_ticks"> diff --git a/doc/classes/SpriteFrames.xml b/doc/classes/SpriteFrames.xml index e806547b7d..68373ebc4f 100644 --- a/doc/classes/SpriteFrames.xml +++ b/doc/classes/SpriteFrames.xml @@ -17,7 +17,7 @@ <argument index="0" name="anim" type="String"> </argument> <description> - Adds a new animation to the the library. + Adds a new animation to the library. </description> </method> <method name="add_frame"> @@ -127,6 +127,13 @@ Changes the animation's name to [code]newname[/code]. </description> </method> + <method name="get_animation_names"> + <return type="PoolStringArray"> + </return> + <description> + Returns an array containing the names associated to each animation. Values are placed in alphabetical order. + </description> + </method> <method name="set_animation_loop"> <return type="void"> </return> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index ee9b7383e5..36408663f6 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -132,6 +132,13 @@ <description> </description> </method> + <method name="get_breakpoints" qualifiers="const"> + <return type="Array"> + </return> + <description> + Return an array containing the line number of each breakpoint. + </description> + </method> <method name="get_keyword_color" qualifiers="const"> <return type="Color"> </return> @@ -220,6 +227,12 @@ Insert a given text at the cursor position. </description> </method> + <method name="is_breakpoint_gutter_enabled" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> <method name="is_folded" qualifiers="const"> <return type="bool"> </return> @@ -265,6 +278,13 @@ Perform redo operation. </description> </method> + <method name="remove_breakpoints"> + <return type="void"> + </return> + <description> + Removes all the breakpoints (without firing "breakpoint_toggled" signal). + </description> + </method> <method name="search" qualifiers="const"> <return type="PoolIntArray"> </return> @@ -302,6 +322,14 @@ Select all the text. </description> </method> + <method name="set_breakpoint_gutter_enabled"> + <return type="void"> + </return> + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> <method name="set_line_as_hidden"> <return type="void"> </return> @@ -344,6 +372,9 @@ </method> </methods> <members> + <member name="breakpoint_gutter" type="bool" setter="set_breakpoint_gutter_enabled" getter="is_breakpoint_gutter_enabled"> + If [code]true[/code] the breakpoint gutter is visible. + </member> <member name="caret_blink" type="bool" setter="cursor_set_blink_enabled" getter="cursor_get_blink_enabled"> If [code]true[/code] the caret (visual cursor) blinks. </member> diff --git a/doc/classes/Texture.xml b/doc/classes/Texture.xml index 3d3ceca150..eb7cfac87b 100644 --- a/doc/classes/Texture.xml +++ b/doc/classes/Texture.xml @@ -5,6 +5,7 @@ </brief_description> <description> A texture works by registering an image in the video hardware, which then can be used in 3D models or 2D [Sprite] or GUI [Control]. + Textures are often created by loading them from a file. See [method @GDScript.load]. </description> <tutorials> </tutorials> diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml index 656063771d..3486b721ca 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -153,6 +153,8 @@ Sets the tile index for the cell given by a Vector2. An index of [code]-1[/code] clears the cell. Optionally, the tile can also be flipped, transposed, or given autotile coordinates. + Note that data such as navigation polygons and collision shapes are not immediately updated for performance reasons. + If you need these to be immediately updated, you can call [method update_dirty_quadrants]. </description> </method> <method name="set_cellv"> @@ -172,6 +174,8 @@ Sets the tile index for the given cell. An index of [code]-1[/code] clears the cell. Optionally, the tile can also be flipped or transposed. + Note that data such as navigation polygons and collision shapes are not immediately updated for performance reasons. + If you need these to be immediately updated, you can call [method update_dirty_quadrants]. </description> </method> <method name="set_collision_layer_bit"> @@ -217,6 +221,13 @@ Calling with invalid (or missing) parameters applies autotiling rules for the entire tilemap. </description> </method> + <method name="update_dirty_quadrants"> + <return type="void"> + </return> + <description> + Updates the tile map's quadrants, allowing things such as navigation and collision shapes to be immediately used if modified. + </description> + </method> <method name="world_to_map" qualifiers="const"> <return type="Vector2"> </return> diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index ba62a385af..6ffeddf5c1 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -207,6 +207,7 @@ <return type="Vector2"> </return> <description> + Returns the vector with all components rounded to the nearest integer, with halfway cases rounded away from zero. </description> </method> <method name="slerp"> diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index c754b27f1e..62a480166a 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -208,6 +208,7 @@ <return type="Vector3"> </return> <description> + Returns the vector with all components rounded to the nearest integer, with halfway cases rounded away from zero. </description> </method> <method name="slerp"> |