Skip to main content

PreviewDrawOptions

Drawing options for an item's preview box

Index

Properties

optionalBackground

Background?: string

The background color to draw the preview box in - defaults to white

optionalBorder

Border?: boolean

Whether or not to draw a border around the preview box

optionalC

The character using the item (used to calculate dynamic item descriptions/previews)

optionalCraft

Craft?: CraftingItem

The crafted properties of the item

optionalDescription

Description?: string

The preview box description.

optionalDisabled

Disabled?: boolean

Whether or not the element is disabled (prevents hover functionality)

optionalForeground

Foreground?: string

The foreground (text) color to draw the description in - defaults to black

optionalHeight

Height?: number

The height of the preview rectangle

optionalHover

Hover?: boolean

Whether or not the button should enable hover behavior (background color change)

optionalHoverBackground

HoverBackground?: string

The background color that should be used on mouse hover, if any

optionalIcons

Icons?: readonly InventoryIcon[]

A list of images to draw in the top-left of the preview box

optionalVibrating

Vibrating?: boolean

Whether or not to add vibration effects to the item - defaults to false

optionalWidth

Width?: number

The width of the preview rectangle