mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
FontRenderer: Basic Rich Text processing and lazy text building
This commit is contained in:
@@ -477,6 +477,18 @@ namespace GlitchyEditor.EditWindows
|
||||
|
||||
private static void ShowTextRendererComponentEditor(Entity entity, TextRendererComponent* textRendererComponent)
|
||||
{
|
||||
StartNewProperty("Rich text");
|
||||
|
||||
ImGui.AttachTooltip("If checked, the text will be interpreted as rich text. This means, that you can use tags to change the style of the text.");
|
||||
|
||||
bool isRichText = textRendererComponent.IsRichText;
|
||||
|
||||
if (ImGui.Checkbox("##rich_text", &isRichText))
|
||||
{
|
||||
textRendererComponent.IsRichText = isRichText;
|
||||
textRendererComponent.NeedsRebuild = true;
|
||||
}
|
||||
|
||||
StartNewProperty("Text");
|
||||
|
||||
String text = textRendererComponent.[Friend]_text;
|
||||
@@ -498,6 +510,8 @@ namespace GlitchyEditor.EditWindows
|
||||
{
|
||||
text.Length = length;
|
||||
}
|
||||
|
||||
textRendererComponent.NeedsRebuild = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user