Interface PortraitMenuCommand

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

Properties

enabled?: (params: PortraitMenuCommandEnabledParams) => boolean

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

Type declaration

execute?: (params: PortraitMenuCommandExecuteParams) => 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

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

tooltip?: string

Optional tooltip text for the target command.