Interface ActorItemSectionFooterCommand

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

Properties

enabled?: ((params) => boolean)

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

Type declaration

Returns

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

Remarks

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

execute?: ((params) => void)

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

Type declaration

Returns

void

Remarks

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.