Skip to content
pixi-silk
GitHub repository
Interface

FieldContext

import type { FieldContext } from 'pixi-silk/ui/inspector';

What every field needs from the inspector around it.

Properties#

PropertyTypeDescriptionDefined in
atlas?SdfAtlasGlyph atlas of the field text. Default the shared one.ui/panels/fields.ts:20
element?HTMLElementThe element the scene is drawn on. Text editing positions its hidden input against it.ui/panels/fields.ts:24
themePanelThemeResolved panel colours, radius and font.ui/panels/fields.ts:18
ticker?Ticker | nullTicker driving the motion. Default Ticker.shared. null for manual tick calls.ui/panels/fields.ts:22

Methods#

popover()#

popover(
   content: Container, 
   anchor: Container, 
   onClose: () => void
): () => void;

Opens content as a popover next to anchor. Returns the function that closes it.

Parameters#

ParameterType
contentContainer
anchorContainer
onClose() => void

Returns#

() => void