initialises a new instance of a Text object.
Configuration properties for the text.
Font size in pixels.
ReadonlyidUnique identifier for the game object.
Number of characters in the text string.
Callback function for click events. Only triggered if the object is registered.
Whether the object should be automatically registered with the engine.
Whether the object is currently registered with the engine.
Static_Static helper for tests to bypass Registry circularity if mocked.
Background box colour.
The bounds component for this object, defining its physical area.
Text fill colour.
Compiled font string (e.g., '25px Helvetica').
Horizontal alignment ('left', 'centre', 'right').
The tag component for this object, managing its name and rendering order.
The text content.
The transform component for this object, managing position and scale.
Vertical alignment ('top', 'middle', 'bottom').
Adds a component to this game object.
The component instance to add.
Removes the text object from the engine.
Emits a custom event on this object's event bus.
The event type.
Optionaldetail: unknownOptional data to pass with the event.
Retrieves a component from this object by its class.
The class of the component to retrieve.
The component instance, or undefined if not found.
Checks if this object has a component of the specified class.
The class to check for.
True if the component exists.
Stops listening for an event on this object's event bus.
The event type.
The function to remove.
Listens for an event on this object's event bus.
The event type.
The function to run when the event occurs.
Registers the text object with the engine for rendering and interaction.
Removes a component from this game object by its class.
The class of the component to remove.
Represents text that can be drawn to the screen and interact with input.