Browse Source

Merge pull request #3991 from Calinou/improve-bbcode-tags-description

Improve the BBCode tags description, mention lack of vertical centering
Rémi Verschelde 4 years ago
parent
commit
24d58f3dc4
1 changed files with 43 additions and 41 deletions
  1. 43 41
      tutorials/gui/bbcode_in_richtextlabel.rst

+ 43 - 41
tutorials/gui/bbcode_in_richtextlabel.rst

@@ -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
 ~~~~~~~~~~~~~~~~~~~~