mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-08 10:10:54 +03:00
Improve the BBCode tags description, mention lack of vertical centering
This was suggested by someone on Twitter.
This commit is contained in:
@@ -41,51 +41,53 @@ markup. All changes to the text must be done in the BBCode parameter.
|
||||
|
||||
.. note::
|
||||
|
||||
For BBCode tags such as ``[b]`` (bold) or ``[i]`` (italics) to work you must
|
||||
set up custom fonts for the RichTextLabel node first.
|
||||
For BBCode tags such as ``[b]`` (bold), ``[i]`` (italics) or ``[code]`` to
|
||||
work, you must set up custom fonts for the RichTextLabel node first.
|
||||
|
||||
There are no BBCode tags to control vertical centering of text yet.
|
||||
|
||||
Reference
|
||||
---------
|
||||
|
||||
+-------------------+--------------------------------------------+--------------------------------------------------------------+
|
||||
| Command | Tag | Description |
|
||||
+-------------------+--------------------------------------------+--------------------------------------------------------------+
|
||||
| **bold** | ``[b]{text}[/b]`` | Makes {text} bold. |
|
||||
+-------------------+--------------------------------------------+--------------------------------------------------------------+
|
||||
| **italics** | ``[i]{text}[/i]`` | Makes {text} italics. |
|
||||
+-------------------+--------------------------------------------+--------------------------------------------------------------+
|
||||
| **underline** | ``[u]{text}[/u]`` | Makes {text} underline. |
|
||||
+-------------------+--------------------------------------------+--------------------------------------------------------------+
|
||||
| **strikethrough** | ``[s]{text}[/s]`` | Makes {text} strikethrough. |
|
||||
+-------------------+--------------------------------------------+--------------------------------------------------------------+
|
||||
| **code** | ``[code]{text}[/code]`` | Makes {text} monospace. |
|
||||
+-------------------+--------------------------------------------+--------------------------------------------------------------+
|
||||
| **center** | ``[center]{text}[/center]`` | Makes {text} centered. |
|
||||
+-------------------+--------------------------------------------+--------------------------------------------------------------+
|
||||
| **right** | ``[right]{text}[/right]`` | Makes {text} right-aligned. |
|
||||
+-------------------+--------------------------------------------+--------------------------------------------------------------+
|
||||
| **fill** | ``[fill]{text}[/fill]`` | Makes {text} fill width. |
|
||||
+-------------------+--------------------------------------------+--------------------------------------------------------------+
|
||||
| **indent** | ``[indent]{text}[/indent]`` | Increase indent level of {text}. |
|
||||
+-------------------+--------------------------------------------+--------------------------------------------------------------+
|
||||
| **url** | ``[url]{url}[/url]`` | Show {url} as such. |
|
||||
+-------------------+--------------------------------------------+--------------------------------------------------------------+
|
||||
| **url (ref)** | ``[url=<url>]{text}[/url]`` | Makes {text} reference <url>. |
|
||||
+-------------------+--------------------------------------------+--------------------------------------------------------------+
|
||||
| **image** | ``[img]{path}[/img]`` | Insert image at resource {path}. |
|
||||
+-------------------+--------------------------------------------+--------------------------------------------------------------+
|
||||
| **resized image** | ``[img=<width>]{path}[/img]`` | Insert image at resource {path} using <width> (keeps ratio). |
|
||||
+-------------------+--------------------------------------------+--------------------------------------------------------------+
|
||||
| **resized image** | ``[img=<width>x<height>]{path}[/img]`` | Insert image at resource {path} using <width> & <height>. |
|
||||
+-------------------+--------------------------------------------+--------------------------------------------------------------+
|
||||
| **font** | ``[font=<path>]{text}[/font]`` | Use custom font at <path> for {text}. |
|
||||
+-------------------+--------------------------------------------+--------------------------------------------------------------+
|
||||
| **color** | ``[color=<code/name>]{text}[/color]`` | Change {text} color; use name or # format, such as #ff00ff. |
|
||||
+-------------------+--------------------------------------------+--------------------------------------------------------------+
|
||||
| **table** | ``[table=<number>]{cells}[/table]`` | Creates a table with <number> of columns. |
|
||||
+-------------------+--------------------------------------------+--------------------------------------------------------------+
|
||||
| **cell** | ``[cell]{text}[/cell]`` | Adds cells with the {text} to the table. |
|
||||
+-------------------+--------------------------------------------+--------------------------------------------------------------+
|
||||
+-------------------+--------------------------------------------+-----------------------------------------------------------------+
|
||||
| Command | Tag | Description |
|
||||
+-------------------+--------------------------------------------+-----------------------------------------------------------------+
|
||||
| **bold** | ``[b]{text}[/b]`` | Makes {text} bold. |
|
||||
+-------------------+--------------------------------------------+-----------------------------------------------------------------+
|
||||
| **italics** | ``[i]{text}[/i]`` | Makes {text} italics. |
|
||||
+-------------------+--------------------------------------------+-----------------------------------------------------------------+
|
||||
| **underline** | ``[u]{text}[/u]`` | Makes {text} underline. |
|
||||
+-------------------+--------------------------------------------+-----------------------------------------------------------------+
|
||||
| **strikethrough** | ``[s]{text}[/s]`` | Makes {text} strikethrough. |
|
||||
+-------------------+--------------------------------------------+-----------------------------------------------------------------+
|
||||
| **code** | ``[code]{text}[/code]`` | Makes {text} use the code font (which is typically monospace). |
|
||||
+-------------------+--------------------------------------------+-----------------------------------------------------------------+
|
||||
| **center** | ``[center]{text}[/center]`` | Makes {text} horizontally centered. |
|
||||
+-------------------+--------------------------------------------+-----------------------------------------------------------------+
|
||||
| **right** | ``[right]{text}[/right]`` | Makes {text} horizontally right-aligned. |
|
||||
+-------------------+--------------------------------------------+-----------------------------------------------------------------+
|
||||
| **fill** | ``[fill]{text}[/fill]`` | Makes {text} fill the RichTextLabel's width. |
|
||||
+-------------------+--------------------------------------------+-----------------------------------------------------------------+
|
||||
| **indent** | ``[indent]{text}[/indent]`` | Increase the indentation level of {text}. |
|
||||
+-------------------+--------------------------------------------+-----------------------------------------------------------------+
|
||||
| **url** | ``[url]{url}[/url]`` | Show {url} as such, underline it and make it clickable. |
|
||||
+-------------------+--------------------------------------------+-----------------------------------------------------------------+
|
||||
| **url (ref)** | ``[url=<url>]{text}[/url]`` | Makes {text} reference <url> (underlined and clickable). |
|
||||
+-------------------+--------------------------------------------+-----------------------------------------------------------------+
|
||||
| **image** | ``[img]{path}[/img]`` | Insert image at resource {path}. |
|
||||
+-------------------+--------------------------------------------+-----------------------------------------------------------------+
|
||||
| **resized image** | ``[img=<width>]{path}[/img]`` | Insert image at resource {path} using <width> (keeps ratio). |
|
||||
+-------------------+--------------------------------------------+-----------------------------------------------------------------+
|
||||
| **resized image** | ``[img=<width>x<height>]{path}[/img]`` | Insert image at resource {path} using <width>×<height>. |
|
||||
+-------------------+--------------------------------------------+-----------------------------------------------------------------+
|
||||
| **font** | ``[font=<path>]{text}[/font]`` | Use custom font at <path> for {text}. |
|
||||
+-------------------+--------------------------------------------+-----------------------------------------------------------------+
|
||||
| **color** | ``[color=<code/name>]{text}[/color]`` | Change {text} color; use name or # format, such as ``#ff00ff``. |
|
||||
+-------------------+--------------------------------------------+-----------------------------------------------------------------+
|
||||
| **table** | ``[table=<number>]{cells}[/table]`` | Creates a table with <number> of columns. |
|
||||
+-------------------+--------------------------------------------+-----------------------------------------------------------------+
|
||||
| **cell** | ``[cell]{text}[/cell]`` | Adds cells with the {text} to the table. |
|
||||
+-------------------+--------------------------------------------+-----------------------------------------------------------------+
|
||||
|
||||
Built-in color names
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Reference in New Issue
Block a user