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

    Interface SceneControlTool

    The data structure for a single tool in the SceneControl#tools record.

    interface SceneControlTool {
        active?: boolean;
        button?: boolean;
        control?: boolean;
        createData?: object;
        creation?: boolean;
        icon: string;
        interaction?: boolean;
        name: string;
        onChange?: (event: Event, active: boolean) => void;
        order: number;
        shapeData?: object;
        title: string;
        toggle?: boolean;
        toolclip?: ToolclipConfiguration;
        visible?: boolean;
    }
    Index

    Properties

    active?: boolean

    Is the tool the currently the active one? Not applicable to toggles or buttons.

    button?: boolean

    Is the tool a "button" in the sense of immediately resolving on click without becoming the active tool?

    control?: boolean

    Does this tool allow placeables to be controlled?

    createData?: object

    Default creation data

    creation?: boolean

    Does this tool create placeables?

    icon: string

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

    interaction?: boolean

    Does this tool allow interaction with placeables?

    name: string

    An identifier for the tool, unique among the tools of its SceneControl

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

    A callback invoked when the tool is activated or deactivated

    order: number

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

    shapeData?: object

    The data of the shape this tool creates

    title: string

    A title for the tool: can be a localization path

    toggle?: boolean

    Is the tool an on-or-off toggle?

    Configuration for rendering the tool's toolclip

    visible?: boolean

    Whether the tool should be visible to the current User