diff options
Diffstat (limited to 'doc')
28 files changed, 250 insertions, 11 deletions
diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml index e1fb78e5b5..02ccab4e05 100644 --- a/doc/classes/AnimatedSprite3D.xml +++ b/doc/classes/AnimatedSprite3D.xml @@ -49,6 +49,11 @@ </member> </members> <signals> + <signal name="animation_finished"> + <description> + Emitted when the animation is finished (when it plays the last frame). If the animation is looping, this signal is emitted every time the last frame is drawn. + </description> + </signal> <signal name="frame_changed"> <description> Emitted when [member frame] changed. diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml index 8908c5f830..96ff5e0293 100644 --- a/doc/classes/Button.xml +++ b/doc/classes/Button.xml @@ -128,7 +128,7 @@ Text [Color] used when the [Button] is being hovered and pressed. </theme_item> <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> - Text outline [Color] of the [Button]. + The tint of text outline of the [Button]. </theme_item> <theme_item name="font_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )"> Text [Color] used when the [Button] is being pressed. @@ -161,7 +161,7 @@ Default [StyleBox] for the [Button]. </theme_item> <theme_item name="outline_size" type="int" default="0"> - Size of the [Button]'s text outline. + The size of the text outline. </theme_item> <theme_item name="pressed" type="StyleBox"> [StyleBox] used when the [Button] is being pressed. diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml index bd91f9ed06..80febfbfe7 100644 --- a/doc/classes/CheckBox.xml +++ b/doc/classes/CheckBox.xml @@ -45,6 +45,9 @@ <theme_item name="font_hover_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )"> The [CheckBox] text's font color when it's hovered and pressed. </theme_item> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of text outline of the [CheckBox]. + </theme_item> <theme_item name="font_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )"> The [CheckBox] text's font color when it's pressed. </theme_item> @@ -63,6 +66,9 @@ <theme_item name="normal" type="StyleBox"> The [StyleBox] to display as a background. </theme_item> + <theme_item name="outline_size" type="int" default="0"> + The size of the text outline. + </theme_item> <theme_item name="pressed" type="StyleBox"> The [StyleBox] to display as a background when the [CheckBox] is pressed. </theme_item> diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml index a05e532d4a..46e590a115 100644 --- a/doc/classes/CheckButton.xml +++ b/doc/classes/CheckButton.xml @@ -42,6 +42,9 @@ <theme_item name="font_hover_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )"> The [CheckButton] text's font color when it's hovered and pressed. </theme_item> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of text outline of the [CheckButton]. + </theme_item> <theme_item name="font_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )"> The [CheckButton] text's font color when it's pressed. </theme_item> @@ -84,6 +87,9 @@ <theme_item name="on_mirrored" type="Texture2D"> The icon to display when the [CheckButton] is checked (for right-to-left layouts). </theme_item> + <theme_item name="outline_size" type="int" default="0"> + The size of the text outline. + </theme_item> <theme_item name="pressed" type="StyleBox"> The [StyleBox] to display as a background when the [CheckButton] is pressed. </theme_item> diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml index f897f2405b..d1483ac88e 100644 --- a/doc/classes/CodeEdit.xml +++ b/doc/classes/CodeEdit.xml @@ -179,6 +179,9 @@ </theme_item> <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> </theme_item> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of text outline of the [CodeEdit]. + </theme_item> <theme_item name="font_readonly_color" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )"> </theme_item> <theme_item name="font_selected_color" type="Color" default="Color( 0, 0, 0, 1 )"> @@ -194,6 +197,9 @@ </theme_item> <theme_item name="normal" type="StyleBox"> </theme_item> + <theme_item name="outline_size" type="int" default="0"> + The size of the text outline. + </theme_item> <theme_item name="read_only" type="StyleBox"> </theme_item> <theme_item name="safe_line_number_color" type="Color" default="Color( 0.67, 0.78, 0.67, 0.6 )"> diff --git a/doc/classes/CollisionPolygon3D.xml b/doc/classes/CollisionPolygon3D.xml index dd3c57d1d0..38f4c5fe5c 100644 --- a/doc/classes/CollisionPolygon3D.xml +++ b/doc/classes/CollisionPolygon3D.xml @@ -17,6 +17,9 @@ <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false"> If [code]true[/code], no collision will be produced. </member> + <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.04"> + The collision margin for the generated [Shape3D]. See [member Shape3D.margin] for more details. + </member> <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( )"> Array of vertices which define the polygon. [b]Note:[/b] The returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the [code]polygon[/code] member. diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml index b351faf9ca..e49027e61d 100644 --- a/doc/classes/ColorPickerButton.xml +++ b/doc/classes/ColorPickerButton.xml @@ -79,6 +79,9 @@ <theme_item name="font_hover_color" type="Color" default="Color( 1, 1, 1, 1 )"> Text [Color] used when the [ColorPickerButton] is being hovered. </theme_item> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of text outline of the [ColorPickerButton]. + </theme_item> <theme_item name="font_pressed_color" type="Color" default="Color( 0.8, 0.8, 0.8, 1 )"> Text [Color] used when the [ColorPickerButton] is being pressed. </theme_item> @@ -94,6 +97,9 @@ <theme_item name="normal" type="StyleBox"> Default [StyleBox] for the [ColorPickerButton]. </theme_item> + <theme_item name="outline_size" type="int" default="0"> + The size of the text outline. + </theme_item> <theme_item name="pressed" type="StyleBox"> [StyleBox] used when the [ColorPickerButton] is being pressed. </theme_item> diff --git a/doc/classes/File.xml b/doc/classes/File.xml index ff03f44789..e0781e807f 100644 --- a/doc/classes/File.xml +++ b/doc/classes/File.xml @@ -42,6 +42,7 @@ [/codeblocks] In the example above, the file will be saved in the user data folder as specified in the [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]Data paths[/url] documentation. [b]Note:[/b] To access project resources once exported, it is recommended to use [ResourceLoader] instead of the [File] API, as some files are converted to engine-specific formats and their original source files might not be present in the exported PCK package. + [b]Note:[/b] Files are automatically closed only if the process exits "normally" (such as by clicking the window manager's close button or pressing [b]Alt + F4[/b]). If you stop the project execution by pressing [b]F8[/b] while the project is running, the file won't be closed as the game process will be killed. You can work around this by calling [method flush] at regular intervals. </description> <tutorials> <link title="File system">https://docs.godotengine.org/en/latest/getting_started/step_by_step/filesystem.html</link> @@ -52,7 +53,7 @@ <return type="void"> </return> <description> - Closes the currently opened file. + Closes the currently opened file and prevents subsequent read/write operations. Use [method flush] to persist the data to disk without closing the file. </description> </method> <method name="eof_reached" qualifiers="const"> @@ -73,6 +74,14 @@ [b]Note:[/b] Many resources types are imported (e.g. textures or sound files), and their source asset will not be included in the exported game, as only the imported version is used. See [method ResourceLoader.exists] for an alternative approach that takes resource remapping into account. </description> </method> + <method name="flush"> + <return type="void"> + </return> + <description> + Writes the file's buffer to disk. Flushing is automatically performed when the file is closed. This means you don't need to call [method flush] manually before closing a file using [method close]. Still, calling [method flush] can be used to ensure the data is safe even if the project crashes instead of being closed gracefully. + [b]Note:[/b] Only call [method flush] when you actually need it. Otherwise, it will decrease performance due to constant disk writes. + </description> + </method> <method name="get_16" qualifiers="const"> <return type="int"> </return> diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml index edd2bd137f..409e405551 100644 --- a/doc/classes/Font.xml +++ b/doc/classes/Font.xml @@ -329,10 +329,10 @@ </methods> <members> <member name="extra_spacing_bottom" type="int" setter="set_spacing" getter="get_spacing" default="0"> - Extra spacing at the bottom in pixels. + Extra spacing at the bottom of the line in pixels. </member> <member name="extra_spacing_top" type="int" setter="set_spacing" getter="get_spacing" default="0"> - Extra character spacing in pixels. + Extra spacing at the top of the line in pixels. </member> </members> <constants> diff --git a/doc/classes/FontData.xml b/doc/classes/FontData.xml index e2c35f9ce7..7e99510124 100644 --- a/doc/classes/FontData.xml +++ b/doc/classes/FontData.xml @@ -154,6 +154,15 @@ Returns list of script support overrides. </description> </method> + <method name="get_spacing" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="type" type="int"> + </argument> + <description> + Returns the spacing for the given [code]type[/code] (see [enum SpacingType]). + </description> + </method> <method name="get_supported_chars" qualifiers="const"> <return type="String"> </return> @@ -296,6 +305,17 @@ Adds override for [method is_script_supported]. </description> </method> + <method name="set_spacing"> + <return type="void"> + </return> + <argument index="0" name="type" type="int"> + </argument> + <argument index="1" name="value" type="int"> + </argument> + <description> + Sets the spacing for [code]type[/code] (see [enum SpacingType]) to [code]value[/code] in pixels (not relative to the font size). + </description> + </method> <method name="set_variation"> <return type="void"> </return> @@ -318,6 +338,14 @@ <member name="distance_field_hint" type="bool" setter="set_distance_field_hint" getter="get_distance_field_hint" default="false"> If [code]true[/code], distance field hint is enabled. </member> + <member name="extra_spacing_glyph" type="int" setter="set_spacing" getter="get_spacing" default="0"> + Extra spacing for each glyphs in pixels. + This can be a negative number to make the distance between glyphs smaller. + </member> + <member name="extra_spacing_space" type="int" setter="set_spacing" getter="get_spacing" default="0"> + Extra spacing for the space character in pixels. + This can be a negative number to make the distance between words smaller. + </member> <member name="force_autohinter" type="bool" setter="set_force_autohinter" getter="get_force_autohinter" default="false"> If [code]true[/code], default autohinter is used for font hinting. </member> @@ -326,5 +354,11 @@ </member> </members> <constants> + <constant name="SPACING_GLYPH" value="0" enum="SpacingType"> + Spacing for each glyph. + </constant> + <constant name="SPACING_SPACE" value="1" enum="SpacingType"> + Spacing for the space character. + </constant> </constants> </class> diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index abc327e8bb..ffeb45907d 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -615,6 +615,9 @@ <theme_item name="font_color" type="Color" default="Color( 0.63, 0.63, 0.63, 1 )"> Default text [Color] of the item. </theme_item> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of text outline of the item. + </theme_item> <theme_item name="font_selected_color" type="Color" default="Color( 1, 1, 1, 1 )"> Text [Color] used when the item is selected. </theme_item> @@ -633,6 +636,9 @@ <theme_item name="line_separation" type="int" default="2"> The vertical spacing between each line of text. </theme_item> + <theme_item name="outline_size" type="int" default="0"> + The size of the item text outline. + </theme_item> <theme_item name="selected" type="StyleBox"> [StyleBox] for the selected items, used when the [ItemList] is not being focused. </theme_item> diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index 61ecff52e3..a6dcabb168 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -380,6 +380,9 @@ <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> Default font color. </theme_item> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of text outline of the [LineEdit]. + </theme_item> <theme_item name="font_selected_color" type="Color" default="Color( 0, 0, 0, 1 )"> Font color for selected text (inside the selection rectangle). </theme_item> @@ -395,6 +398,9 @@ <theme_item name="normal" type="StyleBox"> Default background for the [LineEdit]. </theme_item> + <theme_item name="outline_size" type="int" default="0"> + The size of the text outline. + </theme_item> <theme_item name="read_only" type="StyleBox"> Background used when [LineEdit] is in read-only mode ([member editable] is set to [code]false[/code]). </theme_item> diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml index 0227870152..6e2f4399b3 100644 --- a/doc/classes/LinkButton.xml +++ b/doc/classes/LinkButton.xml @@ -84,12 +84,18 @@ <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> Text [Color] used when the [LinkButton] is being hovered. </theme_item> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of text outline of the [LinkButton]. + </theme_item> <theme_item name="font_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )"> Text [Color] used when the [LinkButton] is being pressed. </theme_item> <theme_item name="font_size" type="int"> Font size of the [LinkButton]'s text. </theme_item> + <theme_item name="outline_size" type="int" default="0"> + The size of the text outline. + </theme_item> <theme_item name="underline_spacing" type="int" default="2"> The vertical space between the baseline of text and the underline. </theme_item> diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml index 1e8874fdc5..481b737eee 100644 --- a/doc/classes/MenuButton.xml +++ b/doc/classes/MenuButton.xml @@ -65,6 +65,9 @@ <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> Text [Color] used when the [MenuButton] is being hovered. </theme_item> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of text outline of the [MenuButton]. + </theme_item> <theme_item name="font_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )"> Text [Color] used when the [MenuButton] is being pressed. </theme_item> @@ -80,6 +83,9 @@ <theme_item name="normal" type="StyleBox"> Default [StyleBox] for the [MenuButton]. </theme_item> + <theme_item name="outline_size" type="int" default="0"> + The size of the text outline. + </theme_item> <theme_item name="pressed" type="StyleBox"> [StyleBox] used when the [MenuButton] is being pressed. </theme_item> diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml index 1a80962751..52da08c02f 100644 --- a/doc/classes/OptionButton.xml +++ b/doc/classes/OptionButton.xml @@ -259,6 +259,9 @@ <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> Text [Color] used when the [OptionButton] is being hovered. </theme_item> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of text outline of the [OptionButton]. + </theme_item> <theme_item name="font_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )"> Text [Color] used when the [OptionButton] is being pressed. </theme_item> @@ -280,6 +283,9 @@ <theme_item name="normal_mirrored" type="StyleBox"> Default [StyleBox] for the [OptionButton] (for right-to-left layouts). </theme_item> + <theme_item name="outline_size" type="int" default="0"> + The size of the text outline. + </theme_item> <theme_item name="pressed" type="StyleBox"> [StyleBox] used when the [OptionButton] is being pressed (for left-to-right layouts). </theme_item> diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index 47e8e57a4e..d810774b25 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -729,6 +729,9 @@ <theme_item name="font_hover_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> [Color] used for the hovered text. </theme_item> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of text outline of the menu item. + </theme_item> <theme_item name="font_separator_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> [Color] used for labeled separators' text. See [method add_separator]. </theme_item> @@ -747,6 +750,9 @@ <theme_item name="labeled_separator_right" type="StyleBox"> [StyleBox] for the right side of labeled separator. See [method add_separator]. </theme_item> + <theme_item name="outline_size" type="int" default="0"> + The size of the item text outline. + </theme_item> <theme_item name="panel" type="StyleBox"> Default [StyleBox] of the [PopupMenu] items. </theme_item> diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml index bb7fd31ee8..160b61c720 100644 --- a/doc/classes/ProgressBar.xml +++ b/doc/classes/ProgressBar.xml @@ -32,11 +32,17 @@ <theme_item name="font_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> The color of the text. </theme_item> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of text outline of the [ProgressBar]. + </theme_item> <theme_item name="font_shadow_color" type="Color" default="Color( 0, 0, 0, 1 )"> The color of the text's shadow. </theme_item> <theme_item name="font_size" type="int"> Font size used to draw the fill percentage if [member percent_visible] is [code]true[/code]. </theme_item> + <theme_item name="outline_size" type="int" default="0"> + The size of the text outline. + </theme_item> </theme_items> </class> diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 35eae32c7b..7ca70f5a7a 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -80,6 +80,27 @@ Returns the total number of paragraphs (newlines or [code]p[/code] tags in the tag stack's text tags). Considers wrapped text as one paragraph. </description> </method> + <method name="get_selected_text" qualifiers="const"> + <return type="String"> + </return> + <description> + Returns the current selection text. Does not include BBCodes. + </description> + </method> + <method name="get_selection_from" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the current selection first character index if a selection is active, [code]-1[/code] otherwise. Does not include BBCodes. + </description> + </method> + <method name="get_selection_to" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the current selection last character index if a selection is active, [code]-1[/code] otherwise. Does not include BBCodes. + </description> + </method> <method name="get_total_character_count" qualifiers="const"> <return type="int"> </return> @@ -597,6 +618,9 @@ <theme_item name="focus" type="StyleBox"> The background The background used when the [RichTextLabel] is focused. </theme_item> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The default tint of text outline. + </theme_item> <theme_item name="font_selected_color" type="Color" default="Color( 0, 0, 0, 1 )"> The color of selected text, used when [member selection_enabled] is [code]true[/code]. </theme_item> @@ -627,6 +651,9 @@ <theme_item name="normal_font_size" type="int"> The default text font size. </theme_item> + <theme_item name="outline_size" type="int" default="0"> + The size of the text outline. + </theme_item> <theme_item name="selection_color" type="Color" default="Color( 0.1, 0.1, 1, 0.8 )"> The color of the selection box. </theme_item> diff --git a/doc/classes/Shape3D.xml b/doc/classes/Shape3D.xml index 2d8bb5d051..f3e62175c6 100644 --- a/doc/classes/Shape3D.xml +++ b/doc/classes/Shape3D.xml @@ -13,7 +13,8 @@ </methods> <members> <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.04"> - The collision margin for the shape. + The collision margin for the shape. Used in Bullet Physics only. + Collision margins allows collision detection to be more efficient by adding an extra shell around shapes. Collision algorithms are more expensive when objects overlap by more than their margin, so a higher value for margins is better for performance, at the cost of accuracy around edges as it makes them less sharp. </member> </members> <constants> diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml index 52577e6102..ddf6b465a4 100644 --- a/doc/classes/TabContainer.xml +++ b/doc/classes/TabContainer.xml @@ -201,6 +201,9 @@ <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> Font color of disabled tabs. </theme_item> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of text outline of the tab name. + </theme_item> <theme_item name="font_selected_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> Font color of the currently selected tab. </theme_item> @@ -225,6 +228,9 @@ <theme_item name="menu_highlight" type="Texture2D"> The icon for the menu button (see [method set_popup]) when it's being hovered with the cursor. </theme_item> + <theme_item name="outline_size" type="int" default="0"> + The size of the tab text outline. + </theme_item> <theme_item name="panel" type="StyleBox"> The style for the background fill. </theme_item> diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml index 0c7b992cbf..df9680bf28 100644 --- a/doc/classes/Tabs.xml +++ b/doc/classes/Tabs.xml @@ -362,6 +362,9 @@ <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> Font color of disabled tabs. </theme_item> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of text outline of the tab name. + </theme_item> <theme_item name="font_selected_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> Font color of the currently selected tab. </theme_item> @@ -380,6 +383,9 @@ <theme_item name="increment_highlight" type="Texture2D"> Icon for the right arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor. </theme_item> + <theme_item name="outline_size" type="int" default="0"> + The size of the tab text outline. + </theme_item> <theme_item name="panel" type="StyleBox"> </theme_item> <theme_item name="tab_disabled" type="StyleBox"> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 539f7afbd8..1d50cd60e5 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -954,6 +954,9 @@ <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> Sets the font [Color]. </theme_item> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of text outline of the [TextEdit]. + </theme_item> <theme_item name="font_readonly_color" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )"> </theme_item> <theme_item name="font_selected_color" type="Color" default="Color( 0, 0, 0, 1 )"> @@ -971,6 +974,9 @@ <theme_item name="normal" type="StyleBox"> Sets the [StyleBox] of this [TextEdit]. </theme_item> + <theme_item name="outline_size" type="int" default="0"> + The size of the text outline. + </theme_item> <theme_item name="read_only" type="StyleBox"> Sets the [StyleBox] of this [TextEdit] when [member readonly] is enabled. </theme_item> diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml index 791646000b..413a77a0e9 100644 --- a/doc/classes/TextServer.xml +++ b/doc/classes/TextServer.xml @@ -295,6 +295,24 @@ Returns list of script support overrides. </description> </method> + <method name="font_get_spacing_glyph" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="font" type="RID"> + </argument> + <description> + Returns extra spacing for each glyphs in pixels. + </description> + </method> + <method name="font_get_spacing_space" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="font" type="RID"> + </argument> + <description> + Sets extra spacing for each glyphs in pixels. + </description> + </method> <method name="font_get_supported_chars" qualifiers="const"> <return type="String"> </return> @@ -490,6 +508,28 @@ Adds override for [method font_is_script_supported]. </description> </method> + <method name="font_set_spacing_glyph"> + <return type="void"> + </return> + <argument index="0" name="font" type="RID"> + </argument> + <argument index="1" name="value" type="int"> + </argument> + <description> + Returns extra spacing for the space character in pixels. + </description> + </method> + <method name="font_set_spacing_space"> + <return type="void"> + </return> + <argument index="0" name="font" type="RID"> + </argument> + <argument index="1" name="value" type="int"> + </argument> + <description> + Sets extra spacing for the space character in pixels. + </description> + </method> <method name="font_set_variation"> <return type="void"> </return> diff --git a/doc/classes/TouchScreenButton.xml b/doc/classes/TouchScreenButton.xml index 355804f2a3..9833f0dc23 100644 --- a/doc/classes/TouchScreenButton.xml +++ b/doc/classes/TouchScreenButton.xml @@ -30,7 +30,8 @@ The button's texture for the normal state. </member> <member name="passby_press" type="bool" setter="set_passby_press" getter="is_passby_press_enabled" default="false"> - If [code]true[/code], pass-by presses are enabled. + If [code]true[/code], the [signal pressed] and [signal released] signals are emitted whenever a pressed finger goes in and out of the button, even if the pressure started outside the active area of the button. + [b]Note:[/b] this is a "pass-by" (not "bypass") press mode. </member> <member name="pressed" type="Texture2D" setter="set_texture_pressed" getter="get_texture_pressed"> The button's texture for the pressed state. diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index 406bda412a..59b72b1ed6 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -524,6 +524,9 @@ <theme_item name="font_color" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )"> Default text [Color] of the item. </theme_item> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of text outline of the item. + </theme_item> <theme_item name="font_selected_color" type="Color" default="Color( 1, 1, 1, 1 )"> Text [Color] used when the item is selected. </theme_item> @@ -539,6 +542,9 @@ <theme_item name="item_margin" type="int" default="12"> The horizontal margin at the start of an item. This is used when folding is enabled for the item. </theme_item> + <theme_item name="outline_size" type="int" default="0"> + The size of the text outline. + </theme_item> <theme_item name="relationship_line_color" type="Color" default="Color( 0.27, 0.27, 0.27, 1 )"> [Color] of the relationship lines. </theme_item> diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 2d129a2c86..ea80b7c248 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -68,7 +68,7 @@ <argument index="0" name="to" type="Vector3"> </argument> <description> - Returns the minimum angle to the given vector, in radians. + Returns the unsigned minimum angle to the given vector, in radians. </description> </method> <method name="bounce"> @@ -465,6 +465,17 @@ Returns a vector with each component set to one or negative one, depending on the signs of this vector's components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component. </description> </method> + <method name="signed_angle_to"> + <return type="float"> + </return> + <argument index="0" name="to" type="Vector3"> + </argument> + <argument index="1" name="axis" type="Vector3"> + </argument> + <description> + Returns the signed angle to the given vector, in radians. The sign of the angle is positive in a counter-clockwise direction and negative in a clockwise direction when viewed from the side specified by the [code]axis[/code]. + </description> + </method> <method name="slerp"> <return type="Vector3"> </return> diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml index 0f887c7705..fbe1e275a9 100644 --- a/doc/classes/Window.xml +++ b/doc/classes/Window.xml @@ -474,8 +474,17 @@ </theme_item> <theme_item name="title_font" type="Font"> </theme_item> + <theme_item name="title_font_size" type="int"> + The size of the title font. + </theme_item> <theme_item name="title_height" type="int" default="20"> </theme_item> + <theme_item name="title_outline_modulate" type="Color" default="Color( 1, 1, 1, 1 )"> + The color of the title outline. + </theme_item> + <theme_item name="title_outline_size" type="int" default="0"> + The size of the title outline. + </theme_item> <theme_item name="window_panel" type="StyleBox"> </theme_item> </theme_items> diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py index 5335116c8a..ae3cc73098 100755 --- a/doc/tools/makerst.py +++ b/doc/tools/makerst.py @@ -110,6 +110,9 @@ class ClassDef: self.theme_items = None # type: Optional[OrderedDict[str, List[ThemeItemDef]]] self.tutorials = [] # type: List[str] + # Used to match the class with XML source for output filtering purposes. + self.filepath = "" # type: str + class State: def __init__(self): # type: () -> None @@ -118,11 +121,12 @@ class State: self.classes = OrderedDict() # type: OrderedDict[str, ClassDef] self.current_class = "" # type: str - def parse_class(self, class_root): # type: (ET.Element) -> None + def parse_class(self, class_root, filepath): # type: (ET.Element, str) -> None class_name = class_root.attrib["name"] class_def = ClassDef(class_name) self.classes[class_name] = class_def + class_def.filepath = filepath inherits = class_root.get("inherits") if inherits is not None: @@ -278,6 +282,7 @@ def parse_arguments(root): # type: (ET.Element) -> List[ParameterDef] def main(): # type: () -> None parser = argparse.ArgumentParser() parser.add_argument("path", nargs="+", help="A path to an XML file or a directory containing XML files to parse.") + parser.add_argument("--filter", default="", help="The filepath pattern for XML files to filter.") group = parser.add_mutually_exclusive_group() group.add_argument("--output", "-o", default=".", help="The directory to save output .rst files in.") group.add_argument( @@ -333,17 +338,21 @@ def main(): # type: () -> None print_error("Duplicate class '{}'".format(name), state) continue - classes[name] = doc + classes[name] = (doc, cur_file) for name, data in classes.items(): try: - state.parse_class(data) + state.parse_class(data[0], data[1]) except Exception as e: print_error("Exception while parsing class '{}': {}".format(name, e), state) state.sort_classes() + pattern = re.compile(args.filter) + for class_name, class_def in state.classes.items(): + if args.filter and not pattern.search(class_def.filepath): + continue state.current_class = class_name make_rst_class(class_def, state, args.dry_run, args.output) |