using GlitchyEngine.Core; using GlitchyEngine.Math; namespace GlitchyEngine.Graphics; /// /// Renders text. /// public class TextRenderer : Component { /// /// Gets or sets whether the text is rich text.
/// If , the text will be parsed for rich text tags; if , the text will be rendered as plain text. ///
public bool IsRichText { get => ScriptGlue.TextRenderer_GetIsRichText(_uuid); set => ScriptGlue.TextRenderer_SetIsRichText(_uuid, value); } /// /// Gets or sets the text. /// public string Text { get { ScriptGlue.TextRenderer_GetText(_uuid, out string text); return text; } set => ScriptGlue.TextRenderer_SetText(_uuid, value); } /// /// The color that will be used to render the text. This color can be overridden by rich text tags. /// public ColorRGBA Color { get { ScriptGlue.TextRenderer_GetColor(_uuid, out ColorRGBA color); return color; } set => ScriptGlue.TextRenderer_SetColor(_uuid, value); } // TODO: PreparedText component }