Foundry Virtual Tabletop - API Documentation - Version 14
    Preparing search index...

    Interface SceneControl

    The data structure for a set of controls in the SceneControls#controls record.

    interface SceneControl {
        activeTool?: string;
        icon: string;
        name: string;
        onChange?: (event: Event, active: boolean) => void;
        onToolChange?: (
            event: Event,
            tool: SceneControlTool,
            active: boolean,
        ) => void;
        order: number;
        title: string;
        tools: Record<string, SceneControlTool>;
        visible?: boolean;
    }
    Index

    Properties

    activeTool?: string
    icon: string

    One or more icon classes for the control, typically Font Awesome classes such as "fa-solid fa-face-smile"

    name: string

    A unique identifier for the control

    onChange?: (event: Event, active: boolean) => void

    A callback invoked when control set is activated or deactivated

    onToolChange?: (event: Event, tool: SceneControlTool, active: boolean) => void

    A callback invoked when a tool is activated or deactivated

    order: number

    An integer indicating the control's order, with 0 being at the top

    title: string

    A title for the control: can be a localization path

    tools: Record<string, SceneControlTool>
    visible?: boolean

    Whether the control should be visible to the current User