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;
        createData?: object;
        hasPalette?: boolean;
        icon: string;
        name: string;
        onChange?: (event: Event, active: boolean) => void;
        order: number;
        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?

    createData?: object

    Default creation data

    hasPalette?: boolean

    Does this tool support a placeable palette?

    icon: string

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

    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

    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