Interface ActorItemSectionFooterCommand

interface ActorItemSectionFooterCommand {
    enabled?: ((params: ActorItemSectionFooterCommandEnabledParams) => boolean);
    execute?: ((params: ActorItemSectionFooterCommandExecuteParams) => void);
    iconClass?: string;
    label?: string;
    tooltip?: string;
}

Properties

enabled?: ((params: ActorItemSectionFooterCommandEnabledParams) => boolean)

An optional callback which allows for conditionally including a command. If not included, defaults to true.

Type declaration

    • (params): boolean
    • Parameters

      Returns boolean

      whether to include this command in the UI for the target item section

This option allows for scenarios such as showing a Versatile Damage button only when an item is tagged as versatile.

execute?: ((params: ActorItemSectionFooterCommandExecuteParams) => void)

An optional callback to allow for executing logic when a user executes the command.

Type declaration

It is up to the user to execute commands, such as clicking a button that represents the command. This is the general-purpose event handler for that button click. Note that the command may instead be a menu item or other control for other scenarios, depending on the sheet and version of Tidy 5e.

iconClass?: string

Optional string of CSS classes representing a FontAwesome icon to be rendered with the command.

label?: string

Optional label to use when displaying the command. Localization keys also work.

tooltip?: string

Optional tooltip text for the target command.