Bbcode table (row text alignment)

Godot Version

4.3

Question

hello everyone! how to make a table in BBCODE so that the values in the first column are aligned on the left and in the second table on the right. I broke my whole head, climbed the forum and neural networks. an example in the i


mage

Does it absolutely have to be a table in BBCode, or will a solution that creates the same result as seen in the image do?

If any solution will do:

  1. Create a new scene that inherits from CanvasLayer.
  2. Add a VBoxContainer child node.
  3. To the VBoxContainer, add an HBoxContainer child node.
  4. To the HBoxContainer, add two RichTextLabel child nodes. Name one of them PropertyLabel and the other ValueLabel.
  5. Add whatever BBCode you want to the labels (for instance, code to align to the right or left.)

Repeat steps 3 through 5 to add more ‘columns’ to your table.

1 Like

Yeah, that’s why we have the GridContainer node.

1 Like

Thank you all for the answers. But I choose bbcode because I want to optimize the output (I don’t really want to generate a Label with text) (many items maybe)

i answer upper(

I think it’s something like:

[table=2]
[cell expand][left]Slot Width/Height[/left][/cell][cell][right]2/1[/right][/cell]
[cell expand][left]Family[/left][/cell][cell][right]Makarov[/right][/cell]
[cell expand][left]TypeWeapon[/left][/cell][cell][right]Pistol[/right][/cell]
[...]
[/table]
2 Likes


Thankss!! All work!