summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-08-19 11:39:45 +0200
committerGitHub <noreply@github.com>2020-08-19 11:39:45 +0200
commit26eb4016a5779dd19f7556dd5d2af3b3b54185cb (patch)
treefb8b3b3fb11ba119ec34255869e4adbbef6471be
parentf568cede8d8a4a3f7051afd2ae8502deb09bc157 (diff)
parent95c2e430958e76ab6cfd3aea21a14abbebd30317 (diff)
Merge pull request #41367 from Calinou/doc-richtextlabel-centering
Document limitations related to centering text with RichTextLabel
-rw-r--r--doc/classes/RichTextLabel.xml1
1 files changed, 1 insertions, 0 deletions
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index c44df72878..a1c4fcc53c 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -6,6 +6,7 @@
<description>
Rich text can contain custom text, fonts, images and some basic formatting. The label manages these as an internal tag stack. It also adapts itself to given width/heights.
[b]Note:[/b] Assignments to [member bbcode_text] clear the tag stack and reconstruct it from the property's contents. Any edits made to [member bbcode_text] will erase previous edits made from other manual sources such as [method append_bbcode] and the [code]push_*[/code] / [method pop] methods.
+ [b]Note:[/b] Unlike [Label], RichTextLabel doesn't have a [i]property[/i] to horizontally align text to the center. Instead, enable [member bbcode_enabled] and surround the text in a [code][center][/code] tag as follows: [code][center]Example[/center][/code]. There is currently no built-in way to vertically align text either, but this can be emulated by relying on anchors/containers and the [member fit_content_height] property.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/gui/bbcode_in_richtextlabel.html</link>