Preparing search index...

    Configures background styling for UI components.

        const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
    const scene = model.project.scene;

    // Create a Text component and configure its background
    const obj = scene.createSceneObject('LabelWithBg');
    const text = obj.addComponent('Text') as Editor.Components.Text;
    text.text = 'Hello World';

    // Enable background with rounded corners
    const bg = text.backgroundSettings;
    bg.enabled = true;
    bg.cornerRadius = 8;
    console.log(`Background: enabled=${bg.enabled}, cornerRadius=${bg.cornerRadius}`);

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    cornerRadius: number

    Corner radius of the background shape.

    enabled: boolean

    Whether the background is visible.

    fill: TextFill

    Fill color and style of the background.

    id: Uuid

    The unique id of the entity.

    margins: Editor.Rect

    Spacing around the background edges.

    meta: Meta

    Metadata associated with this entity, providing access to its unique identifier and other descriptive properties.

    type: string

    The entity's type.

    Methods

    • Returns true if the object is of the specified type.

      Parameters

      • type: string

      Returns boolean