summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-07-19 20:16:01 +0200
committerGitHub <noreply@github.com>2022-07-19 20:16:01 +0200
commit715f556cd4f9b21e223659d899dfb1cd7aa3975a (patch)
treecfa2aceae6599d586585829f7c481e0f138ea686 /doc
parente37525896e0000feecf1d556c67b652b7e8da3da (diff)
parentf63d54126d6874c9048a1bb652d2a6749758420c (diff)
Merge pull request #62139 from bruvzg/label_font_setttings
Add LabelSettings resource for quick Label theme property override.
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/Label.xml3
-rw-r--r--doc/classes/LabelSettings.xml39
2 files changed, 42 insertions, 0 deletions
diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml
index 1eac58b9f2..8448109f02 100644
--- a/doc/classes/Label.xml
+++ b/doc/classes/Label.xml
@@ -49,6 +49,9 @@
<member name="horizontal_alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="0">
Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the [enum HorizontalAlignment] constants.
</member>
+ <member name="label_settings" type="LabelSettings" setter="set_label_settings" getter="get_label_settings">
+ Resource to override [Theme] font, outline and shadow properties.
+ </member>
<member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
</member>
diff --git a/doc/classes/LabelSettings.xml b/doc/classes/LabelSettings.xml
new file mode 100644
index 0000000000..5f7427f4aa
--- /dev/null
+++ b/doc/classes/LabelSettings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="LabelSettings" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Resource to override [Theme] font, outline and shadow properties of the [Label].
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="font" type="Font" setter="set_font" getter="get_font">
+ [Font] of the [Label]'s text.
+ </member>
+ <member name="font_color" type="Color" setter="set_font_color" getter="get_font_color" default="Color(0.875, 0.875, 0.875, 1)">
+ Default text [Color] of the [Label].
+ </member>
+ <member name="font_size" type="int" setter="set_font_size" getter="get_font_size" default="16">
+ Font size of the [Label]'s text.
+ </member>
+ <member name="line_spacing" type="float" setter="set_line_spacing" getter="get_line_spacing" default="0.0">
+ Vertical space between lines in multiline text.
+ </member>
+ <member name="outline_color" type="Color" setter="set_outline_color" getter="get_outline_color" default="Color(1, 1, 1, 1)">
+ The tint of text outline.
+ </member>
+ <member name="outline_size" type="int" setter="set_outline_size" getter="get_outline_size" default="0">
+ Text outline size.
+ </member>
+ <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" default="Color(1, 1, 1, 1)">
+ The tint of text shadow.
+ </member>
+ <member name="shadow_offset" type="Vector2" setter="set_shadow_offset" getter="get_shadow_offset" default="Vector2(1, 1)">
+ The offset of the text's shadow.
+ </member>
+ <member name="shadow_size" type="int" setter="set_shadow_size" getter="get_shadow_size" default="0">
+ The size of the text's shadow.
+ </member>
+ </members>
+</class>