RadialContextMenu
makeMenu(ecd, position, items, [innerRadius], [outerRadius], [backdropInnerRadius], [backdropOuterRadius], [focusWidth], [backgroundColor], [padding], [hook], [closeCallback], [autoLayout], [classList], [pointerPosition], [selectionDistance]) ⇒ Entity
Kind: global function
Param | Type | Default | Description |
---|---|---|---|
ecd | EntityComponentDataset | ||
position | Vector2 | Center of the menu | |
items | Array.<RadialMenuElementDefinition> | Menu options that are to be presented | |
[innerRadius] | number | see RadialMenuElementDefinition for more details | |
[outerRadius] | number | see RadialMenuElementDefinition for more details | |
[backdropInnerRadius] | number | ||
[backdropOuterRadius] | number | ||
[focusWidth] | number | ||
[backgroundColor] | string | ||
[padding] | number | see RadialMenuElementDefinition for more details | |
[hook] | function | ||
[closeCallback] | function | ||
[autoLayout] | boolean | true | |
[classList] | Array.<string> | ||
[pointerPosition] | Vector2 | Used to set initial selection, same as position is not set | |
[selectionDistance] | number | minimum distance in pixels at which selection registers |
makeMenu~setMarkerPosition(x, y)
Kind: inner method of makeMenu
Param | Type |
---|---|
x | number |
y | number |
makeMenu~moveSelector(target)
Kind: inner method of makeMenu
Param | Type |
---|---|
target | Vector2 |
makeMenu~performSelection(p, event)
Kind: inner method of makeMenu
Param | Type |
---|---|
p | Vector2 |
event | Event | MouseEvent |