Open wyattbiker opened 1 month ago
See the documentation:
Godot's class reference supports BBCode-like tags. They add nice formatting to the text which could also be used in the documentation. See also class reference bbcode. Note that this is slightly different from the RichTextLabel BBCode.
In the future, we could unify the RichTextLabel BBCode / Editor Help tags parser, since there is code duplication.
Note that it might not be worth supporting all BBCode tags in documentation, as they can encourage non-standard theming that can be difficult to read on some backgrounds ([color]
).
Instead, the use of a standard syntax including admonitions should be encouraged as much as possible. This would also help third-party docs feel more like built-in documentation, leading to better integration of add-ons.
I agree, some of the codes may not be suitable for tooltips. I did not realize there was an alternate document for describing these, as I was just using the RichTextLabel bbcode documentation. The paragraph mentioning alternate usages is not obvious in https://docs.godotengine.org/en/stable/tutorials/ui/bbcode_in_richtextlabel.html
Maybe a See Also blue box highlighting or enhancing that paragraph would suffice.
Something like
Note that the BBCode tags can also be used to some extent in tooltips for @export script variables as well as in the XML source of the class reference. For more information, see Class reference primer.
Tested versions
v4.3.beta2.official [b75f0485b]
System information
Linux Kubuntu 23.04 KDE Plasma Version: 5.27.4 KDE Frameworks Version: 5.104.0 Qt Version: 5.15.8
Issue description
Adding tooltips to @export variables does not support many bbcodes.
Steps to reproduce
Create an empty 2D scene. E.g.
Control
Add an external script to it. E.g.control.gd
Add the following to script and save:Now hover over the exported variable
maximum_speed
, in the inspector. You will see that only some of the bbcodes work. For example[p], [bgcolor], [right]
are ignored and shown as text. As a matter of fact I have discovered an undocumented[br]
break in lieu of[p]
paragraph code.Minimal reproduction project (MRP)
Test project Archive.zip