I am working on making a game console window in my game and I want there to be BBCode for the output, however when I pass the text to the console it looks like all the bbcode formatting is escaped for some reason.
using Godot;
using System;
public partial class ConsoleComponent : Control
{
public LineEdit ConsoleInput { get; set; }
public RichTextLabel ConsoleOutput { get; set; }
public override void _Ready()
{
ConsoleInput = GetNode<LineEdit>("VBoxConsoleWindow/MarginContainerInput/HBoxContainer/ConsoleInput");
ConsoleOutput = GetNode<RichTextLabel>("VBoxConsoleWindow/MarginContainer/ScrollContainer/VBoxContainer/ConsoleOutput");
}
public override void _Process(double delta)
{
if (ConsoleInput.HasFocus() && Input.IsActionJustPressed("enter"))
{
string timestamp = DateTime.Now.ToString("HH:mm:ss");
ConsoleOutput.AddText("\n[color=gray][" + timestamp + "]>[/color] " + ConsoleInput.Text);
ConsoleOutput.ScrollToLine(ConsoleOutput.GetLineCount());
ConsoleInput.Text = "";
}
}
}