Skip to main content

RadialContextMenu

makeMenu(ecd, position, items, [innerRadius], [outerRadius], [backdropInnerRadius], [backdropOuterRadius], [focusWidth], [backgroundColor], [padding], [hook], [closeCallback], [autoLayout], [classList], [pointerPosition], [selectionDistance]) ⇒ Entity

Kind: global function

ParamTypeDefaultDescription
ecdEntityComponentDataset
positionVector2Center of the menu
itemsArray.<RadialMenuElementDefinition>Menu options that are to be presented
[innerRadius]numbersee RadialMenuElementDefinition for more details
[outerRadius]numbersee RadialMenuElementDefinition for more details
[backdropInnerRadius]number
[backdropOuterRadius]number
[focusWidth]number
[backgroundColor]string
[padding]numbersee RadialMenuElementDefinition for more details
[hook]function
[closeCallback]function
[autoLayout]booleantrue
[classList]Array.<string>
[pointerPosition]Vector2Used to set initial selection, same as position is not set
[selectionDistance]numberminimum distance in pixels at which selection registers

makeMenu~setMarkerPosition(x, y)

Kind: inner method of makeMenu

ParamType
xnumber
ynumber

makeMenu~moveSelector(target)

Kind: inner method of makeMenu

ParamType
targetVector2

makeMenu~performSelection(p, event)

Kind: inner method of makeMenu

ParamType
pVector2
eventEvent | MouseEvent