CraftingSlotsMode
Index
Interfaces
Args
Arguments for Callback representing a crafting item + button pair
button
The .crafting-slot-button button in question
craft
The crafting item (if any) associated with the button
multiSelectListeners
Multi select listeners that can be attached to the button in order to implement click and shift + click selection behavior
Type declaration
click: (this: HTMLButtonElement, ev: PointerEvent) => void
Parameters
this: HTMLButtonElement
ev: PointerEvent
Returns void
focus: (this: HTMLButtonElement, ev: FocusEvent) => void
Parameters
this: HTMLButtonElement
ev: FocusEvent
Returns void
Result
The return type of Callback representing mode-specific heading and mode-accept-button customization
heading
The content of the main crafting slot heading.
Must contain a 1-line summary of the relevant crafting mode. See Result.modeAcceptTooltip if a more extensive description is also desired.
optionalmodeAcceptImgSrc
The image source of the mode-accept button.
optionalmodeAcceptListener
A click listener for the mode-accept button.
If present, the button should serve a "accept all changes" type of role.
If absent, disable the button.
Type declaration
Parameters
this: HTMLButtonElement
ev: PointerEvent
Returns void
optionalmodeAcceptQuestionColor
The color of the mode-accept button's question mark icon.
optionalmodeAcceptTooltip
The tooltip content of the mode-accept button.
Should contain a more extensive description of the relevant crafting mode (if so required; see Result.heading).
Type Aliases
Callback
Data
Type declaration
readonlycallback: Callback
The to-be registered callback used for setting up mode-specific configurations
optionalselectLabel?: string
The
<select>label associated with the registered slot mode. If absent, default to theTextGet(Label${SlotModeName})output
A namespace with helper types for implementing custom crafting slot modes; modes that can be added by adding a callback to CraftingSlots.modeData.