diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/AudioStreamPlaybackPolyphonic.xml | 61 | ||||
-rw-r--r-- | doc/classes/AudioStreamPolyphonic.xml | 17 | ||||
-rw-r--r-- | doc/classes/StyleBox.xml | 37 | ||||
-rw-r--r-- | doc/classes/StyleBoxTexture.xml | 58 |
4 files changed, 120 insertions, 53 deletions
diff --git a/doc/classes/AudioStreamPlaybackPolyphonic.xml b/doc/classes/AudioStreamPlaybackPolyphonic.xml new file mode 100644 index 0000000000..35ab05058a --- /dev/null +++ b/doc/classes/AudioStreamPlaybackPolyphonic.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="AudioStreamPlaybackPolyphonic" inherits="AudioStreamPlayback" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + Playback instance for [AudioStreamPolyphonic]. + </brief_description> + <description> + Playback instance for [AudioStreamPolyphonic]. After setting the [code]stream[/code] property of [AudioStreamPlayer], [AudioStreamPlayer2D], or [AudioStreamPlayer3D], the playback instance can be obtained by calling [method AudioStreamPlayer.get_stream_playback], [method AudioStreamPlayer2D.get_stream_playback] or [method AudioStreamPlayer3D.get_stream_playback] methods. + </description> + <tutorials> + </tutorials> + <methods> + <method name="is_stream_playing" qualifiers="const"> + <return type="bool" /> + <param index="0" name="stream" type="int" /> + <description> + Return true whether the stream associated with an integer ID is still playing. Check [method play_stream] for information on when this ID becomes invalid. + </description> + </method> + <method name="play_stream"> + <return type="int" /> + <param index="0" name="stream" type="AudioStream" /> + <param index="1" name="from_offset" type="float" default="0" /> + <param index="2" name="volume_db" type="float" default="0" /> + <param index="3" name="pitch_scale" type="float" default="1.0" /> + <description> + Play an [AudioStream] at a given offset, volume and pitch scale. Playback starts immediately. + The return value is an unique integer ID that is associated to this playback stream and which can be used to controll it. + This ID becomes invalid when the stream ends (if it does not loop), when the [AudioStreamPlaybackPolyphonic] is stopped, or when [method stop_stream] is called. + This function returns [constant INVALID_ID] if the amount of streams currently playing equals [member AudioStreamPolyphonic.polyphony]. If you need a higher amount of maximum polyphony, raise this value. + </description> + </method> + <method name="set_stream_pitch_scale"> + <return type="void" /> + <param index="0" name="stream" type="int" /> + <param index="1" name="pitch_scale" type="float" /> + <description> + Change the stream pitch scale. The [param stream] argument is an integer ID returned by [method play_stream]. + </description> + </method> + <method name="set_stream_volume"> + <return type="void" /> + <param index="0" name="stream" type="int" /> + <param index="1" name="volume_db" type="float" /> + <description> + Change the stream volume (in db). The [param stream] argument is an integer ID returned by [method play_stream]. + </description> + </method> + <method name="stop_stream"> + <return type="void" /> + <param index="0" name="stream" type="int" /> + <description> + Stop a stream. The [param stream] argument is an integer ID returned by [method play_stream], which becomes invalid after calling this function. + </description> + </method> + </methods> + <constants> + <constant name="INVALID_ID" value="-1"> + Returned by [method play_stream] in case it could not allocate a stream for playback. + </constant> + </constants> +</class> diff --git a/doc/classes/AudioStreamPolyphonic.xml b/doc/classes/AudioStreamPolyphonic.xml new file mode 100644 index 0000000000..baa1fc7037 --- /dev/null +++ b/doc/classes/AudioStreamPolyphonic.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="AudioStreamPolyphonic" inherits="AudioStream" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + AudioStream that lets the user play custom streams at any time from code, simultaneously using a single player. + </brief_description> + <description> + AudioStream that lets the user play custom streams at any time from code, simultaneously using a single player. + Playback control is done via the [AudioStreamPlaybackPolyphonic] instance set inside the player, which can be obtained via [method AudioStreamPlayer.get_stream_playback], [method AudioStreamPlayer2D.get_stream_playback] or [method AudioStreamPlayer3D.get_stream_playback] methods. Obtaining the playback instance is only valid after the [code]stream[/code] property is set as an [AudioStreamPolyphonic] in those players. + </description> + <tutorials> + </tutorials> + <members> + <member name="polyphony" type="int" setter="set_polyphony" getter="get_polyphony" default="32"> + Maximum amount of simultaneous streams that can be played. + </member> + </members> +</class> diff --git a/doc/classes/StyleBox.xml b/doc/classes/StyleBox.xml index ff6d4d8821..4a63f4488c 100644 --- a/doc/classes/StyleBox.xml +++ b/doc/classes/StyleBox.xml @@ -17,21 +17,16 @@ <description> </description> </method> - <method name="_get_center_size" qualifiers="virtual const"> - <return type="Vector2" /> - <description> - </description> - </method> <method name="_get_draw_rect" qualifiers="virtual const"> <return type="Rect2" /> <param index="0" name="rect" type="Rect2" /> <description> </description> </method> - <method name="_get_style_margin" qualifiers="virtual const"> - <return type="float" /> - <param index="0" name="side" type="int" enum="Side" /> + <method name="_get_minimum_size" qualifiers="virtual const"> + <return type="Vector2" /> <description> + Virtual method to be implemented by the user. Returns a custom minimum size that the stylebox must respect when drawing. By default [method get_minimum_size] only takes content margins into account. This method can be overridden to add another size restriction. A combination of the default behavior and the output of this method will be used, to account for both sizes. </description> </method> <method name="_test_mask" qualifiers="virtual const"> @@ -50,10 +45,11 @@ The [RID] value can either be the result of [method CanvasItem.get_canvas_item] called on an existing [CanvasItem]-derived node, or directly from creating a canvas item in the [RenderingServer] with [method RenderingServer.canvas_item_create]. </description> </method> - <method name="get_center_size" qualifiers="const"> - <return type="Vector2" /> + <method name="get_content_margin" qualifiers="const"> + <return type="float" /> + <param index="0" name="margin" type="int" enum="Side" /> <description> - Returns the size of this [StyleBox] without the margins. + Returns the default margin of the specified [enum Side]. </description> </method> <method name="get_current_item_drawn" qualifiers="const"> @@ -62,13 +58,6 @@ Returns the [CanvasItem] that handles its [constant CanvasItem.NOTIFICATION_DRAW] or [method CanvasItem._draw] callback at this moment. </description> </method> - <method name="get_default_margin" qualifiers="const"> - <return type="float" /> - <param index="0" name="margin" type="int" enum="Side" /> - <description> - Returns the default margin of the specified [enum Side]. - </description> - </method> <method name="get_margin" qualifiers="const"> <return type="float" /> <param index="0" name="margin" type="int" enum="Side" /> @@ -89,7 +78,7 @@ Returns the "offset" of a stylebox. This helper function returns a value equivalent to [code]Vector2(style.get_margin(MARGIN_LEFT), style.get_margin(MARGIN_TOP))[/code]. </description> </method> - <method name="set_default_margin"> + <method name="set_content_margin"> <return type="void" /> <param index="0" name="margin" type="int" enum="Side" /> <param index="1" name="offset" type="float" /> @@ -97,7 +86,7 @@ Sets the default value of the specified [enum Side] to [param offset] pixels. </description> </method> - <method name="set_default_margin_all"> + <method name="set_content_margin_all"> <return type="void" /> <param index="0" name="offset" type="float" /> <description> @@ -114,21 +103,21 @@ </method> </methods> <members> - <member name="content_margin_bottom" type="float" setter="set_default_margin" getter="get_default_margin" default="-1.0"> + <member name="content_margin_bottom" type="float" setter="set_content_margin" getter="get_content_margin" default="-1.0"> The bottom margin for the contents of this style box. Increasing this value reduces the space available to the contents from the bottom. If this value is negative, it is ignored and a child-specific margin is used instead. For example for [StyleBoxFlat] the border thickness (if any) is used instead. It is up to the code using this style box to decide what these contents are: for example, a [Button] respects this content margin for the textual contents of the button. [method get_margin] should be used to fetch this value as consumer instead of reading these properties directly. This is because it correctly respects negative values and the fallback mentioned above. </member> - <member name="content_margin_left" type="float" setter="set_default_margin" getter="get_default_margin" default="-1.0"> + <member name="content_margin_left" type="float" setter="set_content_margin" getter="get_content_margin" default="-1.0"> The left margin for the contents of this style box. Increasing this value reduces the space available to the contents from the left. Refer to [member content_margin_bottom] for extra considerations. </member> - <member name="content_margin_right" type="float" setter="set_default_margin" getter="get_default_margin" default="-1.0"> + <member name="content_margin_right" type="float" setter="set_content_margin" getter="get_content_margin" default="-1.0"> The right margin for the contents of this style box. Increasing this value reduces the space available to the contents from the right. Refer to [member content_margin_bottom] for extra considerations. </member> - <member name="content_margin_top" type="float" setter="set_default_margin" getter="get_default_margin" default="-1.0"> + <member name="content_margin_top" type="float" setter="set_content_margin" getter="get_content_margin" default="-1.0"> The top margin for the contents of this style box. Increasing this value reduces the space available to the contents from the top. Refer to [member content_margin_bottom] for extra considerations. </member> diff --git a/doc/classes/StyleBoxTexture.xml b/doc/classes/StyleBoxTexture.xml index aeba777b43..745187ed63 100644 --- a/doc/classes/StyleBoxTexture.xml +++ b/doc/classes/StyleBoxTexture.xml @@ -9,36 +9,36 @@ <tutorials> </tutorials> <methods> - <method name="get_expand_margin_size" qualifiers="const"> + <method name="get_expand_margin" qualifiers="const"> <return type="float" /> <param index="0" name="margin" type="int" enum="Side" /> <description> Returns the expand margin size of the specified [enum Side]. </description> </method> - <method name="get_margin_size" qualifiers="const"> + <method name="get_texture_margin" qualifiers="const"> <return type="float" /> <param index="0" name="margin" type="int" enum="Side" /> <description> Returns the margin size of the specified [enum Side]. </description> </method> - <method name="set_expand_margin_all"> + <method name="set_expand_margin"> <return type="void" /> - <param index="0" name="size" type="float" /> + <param index="0" name="margin" type="int" enum="Side" /> + <param index="1" name="size" type="float" /> <description> - Sets the expand margin to [param size] pixels for all margins. + Sets the expand margin to [param size] pixels for the specified [enum Side]. </description> </method> - <method name="set_expand_margin_size"> + <method name="set_expand_margin_all"> <return type="void" /> - <param index="0" name="margin" type="int" enum="Side" /> - <param index="1" name="size" type="float" /> + <param index="0" name="size" type="float" /> <description> - Sets the expand margin to [param size] pixels for the specified [enum Side]. + Sets the expand margin to [param size] pixels for all margins. </description> </method> - <method name="set_margin_size"> + <method name="set_texture_margin"> <return type="void" /> <param index="0" name="margin" type="int" enum="Side" /> <param index="1" name="size" type="float" /> @@ -46,7 +46,7 @@ Sets the margin to [param size] pixels for the specified [enum Side]. </description> </method> - <method name="set_margin_size_all"> + <method name="set_texture_margin_all"> <return type="void" /> <param index="0" name="size" type="float" /> <description> @@ -64,48 +64,48 @@ <member name="draw_center" type="bool" setter="set_draw_center" getter="is_draw_center_enabled" default="true"> If [code]true[/code], the nine-patch texture's center tile will be drawn. </member> - <member name="expand_margin_bottom" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size" default="0.0"> + <member name="expand_margin_bottom" type="float" setter="set_expand_margin" getter="get_expand_margin" default="0.0"> Expands the bottom margin of this style box when drawing, causing it to be drawn larger than requested. </member> - <member name="expand_margin_left" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size" default="0.0"> + <member name="expand_margin_left" type="float" setter="set_expand_margin" getter="get_expand_margin" default="0.0"> Expands the left margin of this style box when drawing, causing it to be drawn larger than requested. </member> - <member name="expand_margin_right" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size" default="0.0"> + <member name="expand_margin_right" type="float" setter="set_expand_margin" getter="get_expand_margin" default="0.0"> Expands the right margin of this style box when drawing, causing it to be drawn larger than requested. </member> - <member name="expand_margin_top" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size" default="0.0"> + <member name="expand_margin_top" type="float" setter="set_expand_margin" getter="get_expand_margin" default="0.0"> Expands the top margin of this style box when drawing, causing it to be drawn larger than requested. </member> - <member name="margin_bottom" type="float" setter="set_margin_size" getter="get_margin_size" default="0.0"> + <member name="modulate_color" type="Color" setter="set_modulate" getter="get_modulate" default="Color(1, 1, 1, 1)"> + Modulates the color of the texture when this style box is drawn. + </member> + <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2(0, 0, 0, 0)"> + Species a sub-region of the texture to use. + This is equivalent to first wrapping the texture in an [AtlasTexture] with the same region. + </member> + <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> + The texture to use when drawing this style box. + </member> + <member name="texture_margin_bottom" type="float" setter="set_texture_margin" getter="get_texture_margin" default="0.0"> Increases the bottom margin of the 3×3 texture box. A higher value means more of the source texture is considered to be part of the bottom border of the 3×3 box. This is also the value used as fallback for [member StyleBox.content_margin_bottom] if it is negative. </member> - <member name="margin_left" type="float" setter="set_margin_size" getter="get_margin_size" default="0.0"> + <member name="texture_margin_left" type="float" setter="set_texture_margin" getter="get_texture_margin" default="0.0"> Increases the left margin of the 3×3 texture box. A higher value means more of the source texture is considered to be part of the left border of the 3×3 box. This is also the value used as fallback for [member StyleBox.content_margin_left] if it is negative. </member> - <member name="margin_right" type="float" setter="set_margin_size" getter="get_margin_size" default="0.0"> + <member name="texture_margin_right" type="float" setter="set_texture_margin" getter="get_texture_margin" default="0.0"> Increases the right margin of the 3×3 texture box. A higher value means more of the source texture is considered to be part of the right border of the 3×3 box. This is also the value used as fallback for [member StyleBox.content_margin_right] if it is negative. </member> - <member name="margin_top" type="float" setter="set_margin_size" getter="get_margin_size" default="0.0"> + <member name="texture_margin_top" type="float" setter="set_texture_margin" getter="get_texture_margin" default="0.0"> Increases the top margin of the 3×3 texture box. A higher value means more of the source texture is considered to be part of the top border of the 3×3 box. This is also the value used as fallback for [member StyleBox.content_margin_top] if it is negative. </member> - <member name="modulate_color" type="Color" setter="set_modulate" getter="get_modulate" default="Color(1, 1, 1, 1)"> - Modulates the color of the texture when this style box is drawn. - </member> - <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2(0, 0, 0, 0)"> - Species a sub-region of the texture to use. - This is equivalent to first wrapping the texture in an [AtlasTexture] with the same region. - </member> - <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> - The texture to use when drawing this style box. - </member> </members> <constants> <constant name="AXIS_STRETCH_MODE_STRETCH" value="0" enum="AxisStretchMode"> |