RadialMenuOptions
import type { RadialMenuOptions } from 'pixi-silk/ui/radial';
Options of RadialMenu. Distances are design units, scaled per input kind by the profile.
Properties#
| Property | Type | Description | Defined in |
|---|---|---|---|
autoDirection? | boolean | Partial rings opened near an edge of bounds turn to face the inside. Default true. | ui/RadialMenu.ts:97 |
bounds? | | RadialBounds | (() => RadialBounds) | Keeps the menu inside this rectangle (parent coordinates). | ui/RadialMenu.ts:117 |
closeOnLeave? | boolean | Close when the pointer stays outside the falloff area for the profile’s leave delay. Default false: it stays. | ui/RadialMenu.ts:111 |
closeOnSelect? | boolean | Close after a selection. Default true. | ui/RadialMenu.ts:113 |
corner? | number | Corner radius of segments, in units. Default 10. | ui/RadialMenu.ts:101 |
direction? | number | Direction the ring faces (radians, 0 = right, -PI/2 = up). On a full ring, where the first item sits. Default up. | ui/RadialMenu.ts:95 |
escapeCloses? | boolean | Escape closes the menu. Listens on window only while open. Default true. | ui/RadialMenu.ts:125 |
gap? | number | Gap between segments, in units. Default 4. | ui/RadialMenu.ts:99 |
hub? | boolean | Draw the centre disc. Turn it off when the menu opens around a button that should stay visible. Default true. | ui/RadialMenu.ts:127 |
iconSize? | number | Icon size, in units. Default 26. | ui/RadialMenu.ts:109 |
innerRadius? | number | Inner radius of the first ring (the hub sits inside). Default 40. | ui/RadialMenu.ts:89 |
itemArc? | number | Arc length of one sub-item along its ring, in units. Default 58. | ui/RadialMenu.ts:107 |
items | RadialItem[] | Items of the first ring, in order from direction clockwise. | ui/RadialMenu.ts:87 |
onClose? | (item: RadialItem | null) => void | The menu started closing. item is the selection, if any. | ui/RadialMenu.ts:133 |
onSelect? | (item: RadialItem, path: readonly RadialItem[]) => void | An item was picked. path runs from the first ring to the item, the item included. | ui/RadialMenu.ts:131 |
outerRadius? | number | Outer radius of the first ring. Default 100. | ui/RadialMenu.ts:91 |
profiles? | Partial<Record<InputKind, Partial<InputProfile>>> | Per-pointer-kind tuning of dead zone, falloff, scale, tap and hysteresis. | ui/RadialMenu.ts:119 |
ringGap? | number | Gap between rings, in units. Default 6. | ui/RadialMenu.ts:103 |
ringWidth? | number | Thickness of sub-rings, in units. Default 46. | ui/RadialMenu.ts:105 |
selectParents? | boolean | Items with children can be selected too (otherwise they only open their ring). Default false. | ui/RadialMenu.ts:115 |
sweep? | number | Angle covered by the first ring: Math.PI * 2 for a full pie, Math.PI for a half. Default full. | ui/RadialMenu.ts:93 |
textStyle? | TextStyleOptions | Style of text labels. | ui/RadialMenu.ts:123 |
theme? | Partial<RadialTheme> | Colours merged over RADIAL_THEME. Read once, at construction. | ui/RadialMenu.ts:121 |
ticker? | Ticker | null | Ticker driving the animation. Default Ticker.shared. null for manual RadialMenu.tick. | ui/RadialMenu.ts:129 |