Skip to content

DialogueBox

namespace Griff.Scenes;
public sealed class DialogueBox : Component

Makes an entity a dialogue box that shows who’s talking: the Speaker’s name in its NameTag and their picture in its Portrait, each hidden when there’s nothing to show (a sign, someone without a portrait). A box without one shows the lines only. Entity → Create Dialogue Box makes one with both.

This is a component: its saved properties are on its component page.

public string? NameTag { get; set; }

The entity inside the box whose Text shows the speaker’s name.

public string? Portrait { get; set; }

The entity inside the box whose Sprite shows the speaker’s portrait.

public float WrapWidth { get; set; }

How wide a line can be, in world units, before it carries on onto the next: 0 never wraps it. Words are kept whole, and the width is reckoned from the text’s size, so it’s about that wide whatever the font.