diff options
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/DisplayServer.xml | 8 | ||||
-rw-r--r-- | doc/classes/EditorImportPlugin.xml | 3 | ||||
-rw-r--r-- | doc/classes/FontFile.xml | 17 | ||||
-rw-r--r-- | doc/classes/FontVariation.xml | 10 |
4 files changed, 27 insertions, 11 deletions
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index 6f4a7fc13d..55ba1f4f0c 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -1325,6 +1325,7 @@ <param index="1" name="window_id" type="int" default="0" /> <description> Sets the maximum size of the window specified by [param window_id] in pixels. Normally, the user will not be able to drag the window to make it smaller than the specified size. See also [method window_get_max_size]. + [b]Note:[/b] It's recommended to change this value using [member Window.max_size] instead. [b]Note:[/b] Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit. </description> </method> @@ -1334,6 +1335,7 @@ <param index="1" name="window_id" type="int" default="0" /> <description> Sets the minimum size for the given window to [param min_size] (in pixels). Normally, the user will not be able to drag the window to make it larger than the specified size. See also [method window_get_min_size]. + [b]Note:[/b] It's recommended to change this value using [member Window.min_size] instead. [b]Note:[/b] By default, the main window has a minimum size of [code]Vector2i(64, 64)[/code]. This prevents issues that can arise when the window is resized to a near-zero size. [b]Note:[/b] Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit. </description> @@ -1403,6 +1405,7 @@ +-------------+ +-------+ [/codeblock] See also [method window_get_position] and [method window_set_size]. + [b]Note:[/b] It's recommended to change this value using [member Window.position] instead. </description> </method> <method name="window_set_rect_changed_callback"> @@ -1419,6 +1422,7 @@ <param index="1" name="window_id" type="int" default="0" /> <description> Sets the size of the given window to [param size] (in pixels). See also [method window_get_size] and [method window_get_position]. + [b]Note:[/b] It's recommended to change this value using [member Window.size] instead. </description> </method> <method name="window_set_title"> @@ -1427,6 +1431,7 @@ <param index="1" name="window_id" type="int" default="0" /> <description> Sets the title of the given window to [param title]. + [b]Note:[/b] It's recommended to change this value using [member Window.title] instead. [b]Note:[/b] Avoid changing the window title every frame, as this can cause performance issues on certain window managers. Try to change the window title only a few times per second at most. </description> </method> @@ -1436,7 +1441,8 @@ <param index="1" name="parent_window_id" type="int" /> <description> Sets window transient parent. Transient window is will be destroyed with its transient parent and will return focus to their parent when closed. The transient window is displayed on top of a non-exclusive full-screen parent window. Transient windows can't enter full-screen mode. - Note that behavior might be different depending on the platform. + [b]Note:[/b] It's recommended to change this value using [member Window.transient] instead. + [b]Note:[/b] The behavior might be different depending on the platform. </description> </method> <method name="window_set_vsync_mode"> diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml index 1d6a642ab2..66b61f187e 100644 --- a/doc/classes/EditorImportPlugin.xml +++ b/doc/classes/EditorImportPlugin.xml @@ -232,8 +232,9 @@ <param index="0" name="path" type="String" /> <param index="1" name="custom_options" type="Dictionary" default="{}" /> <param index="2" name="custom_importer" type="String" default="""" /> + <param index="3" name="generator_parameters" type="Variant" default="null" /> <description> - This function can only be called during the [method _import] callback and it allows manually importing resources from it. This is useful when the imported file generates external resources that require importing (as example, images). Custom parameters for the ".import" file can be passed via the [param custom_options]. Additionally, in cases where multiple importers can handle a file, the [param custom_importer] ca be specified to force a specific one. This function performs a resource import and returns immediately with a success or error code. + This function can only be called during the [method _import] callback and it allows manually importing resources from it. This is useful when the imported file generates external resources that require importing (as example, images). Custom parameters for the ".import" file can be passed via the [param custom_options]. Additionally, in cases where multiple importers can handle a file, the [param custom_importer] ca be specified to force a specific one. This function performs a resource import and returns immediately with a success or error code. [param generator_parameters] defines optional extra metadata which will be stored as [code]generator_parameters[/code] in the [code]remap[/code] section of the [code].import[/code] file, for example to store a md5 hash of the source data. </description> </method> </methods> diff --git a/doc/classes/FontFile.xml b/doc/classes/FontFile.xml index 69a7627774..a349c2b7b7 100644 --- a/doc/classes/FontFile.xml +++ b/doc/classes/FontFile.xml @@ -17,13 +17,13 @@ [codeblocks] [gdscript] var f = load("res://BarlowCondensed-Bold.ttf") - $"Label".set("custom_fonts/font", f) - $"Label".set("custom_fonts/font_size", 64) + $Label.add_theme_font_override("font", f) + $Label.add_theme_font_size_override("font_size", 64) [/gdscript] [csharp] var f = ResourceLoader.Load<FontFile>("res://BarlowCondensed-Bold.ttf"); - GetNode("Label").Set("custom_fonts/font", f); - GetNode("Label").Set("custom_font_sizes/font_size", 64); + GetNode("Label").AddThemeFontOverride("font", f); + GetNode("Label").AddThemeFontSizeOverride("font_size", 64); [/csharp] [/codeblocks] </description> @@ -88,6 +88,7 @@ <param index="0" name="cache_index" type="int" /> <param index="1" name="size" type="int" /> <description> + Returns the font descent (number of pixels below the baseline). </description> </method> <method name="get_cache_scale" qualifiers="const"> @@ -95,6 +96,7 @@ <param index="0" name="cache_index" type="int" /> <param index="1" name="size" type="int" /> <description> + Returns scaling factor of the color bitmap font. </description> </method> <method name="get_cache_underline_position" qualifiers="const"> @@ -102,6 +104,7 @@ <param index="0" name="cache_index" type="int" /> <param index="1" name="size" type="int" /> <description> + Returns pixel offset of the underline below the baseline. </description> </method> <method name="get_cache_underline_thickness" qualifiers="const"> @@ -109,6 +112,7 @@ <param index="0" name="cache_index" type="int" /> <param index="1" name="size" type="int" /> <description> + Returns thickness of the underline in pixels. </description> </method> <method name="get_embolden" qualifiers="const"> @@ -377,6 +381,7 @@ <param index="1" name="size" type="int" /> <param index="2" name="ascent" type="float" /> <description> + Sets the font ascent (number of pixels above the baseline). </description> </method> <method name="set_cache_descent"> @@ -385,6 +390,7 @@ <param index="1" name="size" type="int" /> <param index="2" name="descent" type="float" /> <description> + Sets the font descent (number of pixels below the baseline). </description> </method> <method name="set_cache_scale"> @@ -393,6 +399,7 @@ <param index="1" name="size" type="int" /> <param index="2" name="scale" type="float" /> <description> + Sets scaling factor of the color bitmap font. </description> </method> <method name="set_cache_underline_position"> @@ -401,6 +408,7 @@ <param index="1" name="size" type="int" /> <param index="2" name="underline_position" type="float" /> <description> + Sets pixel offset of the underline below the baseline. </description> </method> <method name="set_cache_underline_thickness"> @@ -409,6 +417,7 @@ <param index="1" name="size" type="int" /> <param index="2" name="underline_thickness" type="float" /> <description> + Sets thickness of the underline in pixels. </description> </method> <method name="set_embolden"> diff --git a/doc/classes/FontVariation.xml b/doc/classes/FontVariation.xml index e0fad126b9..5bc2606adb 100644 --- a/doc/classes/FontVariation.xml +++ b/doc/classes/FontVariation.xml @@ -10,16 +10,16 @@ [gdscript] var fv = FontVariation.new() fv.set_base_font(load("res://BarlowCondensed-Regular.ttf")) - fv.set_variation_embolden(1.2); - $"Label".set("custom_fonts/font", fv) - $"Label".set("custom_fonts/font_size", 64) + fv.set_variation_embolden(1.2) + $Label.add_theme_font_override("font", fv) + $Label.add_theme_font_size_override("font_size", 64) [/gdscript] [csharp] var fv = new FontVariation(); fv.SetBaseFont(ResourceLoader.Load<FontFile>("res://BarlowCondensed-Regular.ttf")); fv.SetVariationEmbolden(1.2); - GetNode("Label").Set("custom_fonts/font", fv); - GetNode("Label").Set("custom_font_sizes/font_size", 64); + GetNode("Label").AddThemeFontOverride("font", fv); + GetNode("Label").AddThemeFontSizeOverride("font_size", 64); [/csharp] [/codeblocks] </description> |