diff options
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/AnimatedSprite3D.xml | 8 | ||||
-rw-r--r-- | doc/classes/Dictionary.xml | 10 | ||||
-rw-r--r-- | doc/classes/DisplayServer.xml | 70 |
3 files changed, 58 insertions, 30 deletions
diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml index 68354f092c..0bc5484e3a 100644 --- a/doc/classes/AnimatedSprite3D.xml +++ b/doc/classes/AnimatedSprite3D.xml @@ -10,12 +10,6 @@ <link title="2D Sprite animation (also applies to 3D)">$DOCS_URL/tutorials/2d/2d_sprite_animation.html</link> </tutorials> <methods> - <method name="is_playing" qualifiers="const"> - <return type="bool" /> - <description> - Returns [code]true[/code] if an animation is currently being played. - </description> - </method> <method name="play"> <return type="void" /> <param index="0" name="anim" type="StringName" default="&""" /> @@ -40,7 +34,7 @@ <member name="frames" type="SpriteFrames" setter="set_sprite_frames" getter="get_sprite_frames"> The [SpriteFrames] resource containing the animation(s). </member> - <member name="playing" type="bool" setter="_set_playing" getter="_is_playing" default="false"> + <member name="playing" type="bool" setter="set_playing" getter="is_playing" default="false"> If [code]true[/code], the [member animation] is currently playing. </member> </members> diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index 40b5e88fff..9dbeeb360c 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -4,7 +4,7 @@ Dictionary type. </brief_description> <description> - Dictionary type. Associative container which contains values referenced by unique keys. Dictionaries are composed of pairs of keys (which must be unique) and values. Dictionaries will preserve the insertion order when adding elements, even though this may not be reflected when printing the dictionary. In other programming languages, this data structure is sometimes referred to as a hash map or associative array. + Dictionary type. Associative container which contains values referenced by unique keys. Dictionaries are composed of pairs of keys (which must be unique) and values. Dictionaries will preserve the insertion order when adding elements. In other programming languages, this data structure is sometimes referred to as a hash map or associative array. You can define a dictionary by placing a comma-separated list of [code]key: value[/code] pairs in curly braces [code]{}[/code]. Erasing elements while iterating over them [b]is not supported[/b] and will result in undefined behavior. [b]Note:[/b] Dictionaries are always passed by reference. To get a copy of a dictionary which can be modified independently of the original dictionary, use [method duplicate]. @@ -218,6 +218,14 @@ [b]Note:[/b] Don't erase elements while iterating over the dictionary. You can iterate over the [method keys] array instead. </description> </method> + <method name="find_key" qualifiers="const"> + <return type="Variant" /> + <param index="0" name="value" type="Variant" /> + <description> + Returns the first key whose associated value is equal to [param value], or [code]null[/code] if no such value is found. + [b]Node:[/b] [code]null[/code] is also a valid key. I you have it in your [Dictionary], the [method find_key] method can give misleading results. + </description> + </method> <method name="get" qualifiers="const"> <return type="Variant" /> <param index="0" name="key" type="Variant" /> diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index 35a2861c54..1d225aa06e 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -148,9 +148,10 @@ <param index="0" name="menu_root" type="String" /> <param index="1" name="label" type="String" /> <param index="2" name="callback" type="Callable" /> - <param index="3" name="tag" type="Variant" default="null" /> - <param index="4" name="accelerator" type="int" enum="Key" default="0" /> - <param index="5" name="index" type="int" default="-1" /> + <param index="3" name="key_callback" type="Callable" /> + <param index="4" name="tag" type="Variant" default="null" /> + <param index="5" name="accelerator" type="int" enum="Key" default="0" /> + <param index="6" name="index" type="int" default="-1" /> <description> Adds a new checkable item with text [param label] to the global menu with ID [param menu_root]. Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. @@ -168,9 +169,10 @@ <param index="1" name="icon" type="Texture2D" /> <param index="2" name="label" type="String" /> <param index="3" name="callback" type="Callable" /> - <param index="4" name="tag" type="Variant" default="null" /> - <param index="5" name="accelerator" type="int" enum="Key" default="0" /> - <param index="6" name="index" type="int" default="-1" /> + <param index="4" name="key_callback" type="Callable" /> + <param index="5" name="tag" type="Variant" default="null" /> + <param index="6" name="accelerator" type="int" enum="Key" default="0" /> + <param index="7" name="index" type="int" default="-1" /> <description> Adds a new checkable item with text [param label] and icon [param icon] to the global menu with ID [param menu_root]. Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. @@ -188,9 +190,10 @@ <param index="1" name="icon" type="Texture2D" /> <param index="2" name="label" type="String" /> <param index="3" name="callback" type="Callable" /> - <param index="4" name="tag" type="Variant" default="null" /> - <param index="5" name="accelerator" type="int" enum="Key" default="0" /> - <param index="6" name="index" type="int" default="-1" /> + <param index="4" name="key_callback" type="Callable" /> + <param index="5" name="tag" type="Variant" default="null" /> + <param index="6" name="accelerator" type="int" enum="Key" default="0" /> + <param index="7" name="index" type="int" default="-1" /> <description> Adds a new item with text [param label] and icon [param icon] to the global menu with ID [param menu_root]. Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. @@ -208,9 +211,10 @@ <param index="1" name="icon" type="Texture2D" /> <param index="2" name="label" type="String" /> <param index="3" name="callback" type="Callable" /> - <param index="4" name="tag" type="Variant" default="null" /> - <param index="5" name="accelerator" type="int" enum="Key" default="0" /> - <param index="6" name="index" type="int" default="-1" /> + <param index="4" name="key_callback" type="Callable" /> + <param index="5" name="tag" type="Variant" default="null" /> + <param index="6" name="accelerator" type="int" enum="Key" default="0" /> + <param index="7" name="index" type="int" default="-1" /> <description> Adds a new radio-checkable item with text [param label] and icon [param icon] to the global menu with ID [param menu_root]. Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. @@ -228,9 +232,10 @@ <param index="0" name="menu_root" type="String" /> <param index="1" name="label" type="String" /> <param index="2" name="callback" type="Callable" /> - <param index="3" name="tag" type="Variant" default="null" /> - <param index="4" name="accelerator" type="int" enum="Key" default="0" /> - <param index="5" name="index" type="int" default="-1" /> + <param index="3" name="key_callback" type="Callable" /> + <param index="4" name="tag" type="Variant" default="null" /> + <param index="5" name="accelerator" type="int" enum="Key" default="0" /> + <param index="6" name="index" type="int" default="-1" /> <description> Adds a new item with text [param label] to the global menu with ID [param menu_root]. Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. @@ -249,9 +254,10 @@ <param index="2" name="max_states" type="int" /> <param index="3" name="default_state" type="int" /> <param index="4" name="callback" type="Callable" /> - <param index="5" name="tag" type="Variant" default="null" /> - <param index="6" name="accelerator" type="int" enum="Key" default="0" /> - <param index="7" name="index" type="int" default="-1" /> + <param index="5" name="key_callback" type="Callable" /> + <param index="6" name="tag" type="Variant" default="null" /> + <param index="7" name="accelerator" type="int" enum="Key" default="0" /> + <param index="8" name="index" type="int" default="-1" /> <description> Adds a new item with text [param labe] to the global menu with ID [param menu_root]. Contrarily to normal binary items, multistate items can have more than two states, as defined by [param max_states]. Each press or activate of the item will increase the state by one. The default value is defined by [param default_state]. @@ -270,9 +276,10 @@ <param index="0" name="menu_root" type="String" /> <param index="1" name="label" type="String" /> <param index="2" name="callback" type="Callable" /> - <param index="3" name="tag" type="Variant" default="null" /> - <param index="4" name="accelerator" type="int" enum="Key" default="0" /> - <param index="5" name="index" type="int" default="-1" /> + <param index="3" name="key_callback" type="Callable" /> + <param index="4" name="tag" type="Variant" default="null" /> + <param index="5" name="accelerator" type="int" enum="Key" default="0" /> + <param index="6" name="index" type="int" default="-1" /> <description> Adds a new radio-checkable item with text [param label] to the global menu with ID [param menu_root]. Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. @@ -384,6 +391,15 @@ [b]Note:[/b] This method is implemented on macOS. </description> </method> + <method name="global_menu_get_item_key_callback" qualifiers="const"> + <return type="Callable" /> + <param index="0" name="menu_root" type="String" /> + <param index="1" name="idx" type="int" /> + <description> + Returns the callback of the item accelerator at index [param idx]. + [b]Note:[/b] This method is implemented on macOS. + </description> + </method> <method name="global_menu_get_item_max_states" qualifiers="const"> <return type="int" /> <param index="0" name="menu_root" type="String" /> @@ -502,7 +518,7 @@ <param index="1" name="idx" type="int" /> <param index="2" name="callback" type="Callable" /> <description> - Sets the callback of the item at index [param idx]. Callback is emitted when an item is pressed or its accelerator is activated. + Sets the callback of the item at index [param idx]. Callback is emitted when an item is pressed. [b]Note:[/b] This method is implemented on macOS. </description> </method> @@ -557,6 +573,16 @@ [b]Note:[/b] This method is implemented on macOS. </description> </method> + <method name="global_menu_set_item_key_callback"> + <return type="void" /> + <param index="0" name="menu_root" type="String" /> + <param index="1" name="idx" type="int" /> + <param index="2" name="key_callback" type="Callable" /> + <description> + Sets the callback of the item at index [param idx]. Callback is emitted when its accelerator is activated. + [b]Note:[/b] This method is implemented on macOS. + </description> + </method> <method name="global_menu_set_item_max_states"> <return type="void" /> <param index="0" name="menu_root" type="String" /> |