Preparing search index...

    Configuration descriptor for a project settings plugin, holding the section and title used to register the panel.

        // Descriptor (from LensStudio:ProjectSettingsPlugin) extends BaseDescriptor
    // and supplies metadata for a settings panel entry: id, name, description,
    // icon, section, and title.
    //
    // Use it inside a ProjectSettingsPlugin subclass's static descriptor() —
    // Lens Studio reads it to register the panel.
    import { ProjectSettingsPlugin, Descriptor } from 'LensStudio:ProjectSettingsPlugin';
    import { Widget, BoxLayout, Direction, Label } from 'LensStudio:Ui';

    export class MySettingsPlugin extends ProjectSettingsPlugin {
    root: Widget | null = null;

    static descriptor(): Descriptor {
    const d = new Descriptor();
    d.id = 'com.example.mySettings';
    d.name = 'My Settings';
    d.description = 'A minimal project settings panel';
    d.section = 'General';
    d.title = 'My Custom Settings';
    // Icon loaded from an .svg/.png path bundled with the plugin.
    d.icon = Editor.Icon.fromFile(new Editor.Path('icons/settings.svg'));
    return d;
    }

    createWidget(parent: Widget): Widget {
    this.root = new Widget(parent);
    const layout = new BoxLayout();
    layout.setDirection(Direction.TopToBottom);
    this.root.layout = layout;
    const label = new Label(this.root);
    label.text = 'Hello from My Settings';
    layout.addWidget(label);
    return this.root;
    }

    deinit(): void {
    if (this.root) { this.root.deleteLater(); this.root = null; }
    }
    }

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    dependencies: InterfaceId[]

    Array of interface IDs that this plugin requires to function.

    description: string

    Human-readable description of the plugin shown in the plugin manager.

    icon: Editor.Icon

    Icon displayed for the settings panel entry.

    id: string

    Unique identifier for the plugin, typically in reverse domain notation.

    interfaces: InterfaceId[]

    Array of interface IDs that this plugin provides or implements.

    name: string

    Display name of the plugin.

    section: string

    Section name under which this settings panel is grouped.

    title: string

    Display title shown for this settings panel entry.

    Methods

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

      Parameters

      • type: string

      Returns boolean