Skip to main content

Interface: ButtonOptions

Extends

  • CompositeOptions.TextOptions

Properties

alpha?

optional alpha: number

Opacity of the node. 0 is fully transparent, 1 is fully opaque. Default is 1.0. Alpha has multiplicative inheritance. For example, if the node's parent is alpha .5 and this node's is alpha .4, then the node will appear with alpha .2.

Inherited from

CompositeOptions.alpha

Source

core/dist/index.d.ts:100


anchorPoint?

optional anchorPoint: Point

Point within the node that determines its position. Default is { x: 0.5, y: 0.5 }, which centers the node on its position

Inherited from

CompositeOptions.anchorPoint

Source

core/dist/index.d.ts:43


backgroundColor?

optional backgroundColor: RgbaColor

Background color of button. Default is WebColors.Black

Source

addons/src/composites/button.ts:26


cornerRadius?

optional cornerRadius: number

Corner radius of button; can be used to make rounded corners. Default is 9

Source

addons/src/composites/button.ts:24


draggable?

optional draggable: boolean

Can the node be dragged?

Inherited from

CompositeOptions.draggable

Source

core/dist/index.d.ts:106


fontColor?

optional fontColor: RgbaColor

Color of button text. Default is WebColors.White

Overrides

TextOptions.fontColor

Source

addons/src/composites/button.ts:28


fontName?

optional fontName: string

Name of font to use for text. Must have been previously loaded

Inherited from

TextOptions.fontName

Source

core/dist/index.d.ts:2490


fontNames?

optional fontNames: string[]

Names of multiple fonts to use for text. For example, if a text font and an emoji font are to be used together. Must have been previously loaded

Source

addons/src/composites/button.ts:30


fontSize?

optional fontSize: number

Size of button text. Default is 20.

Overrides

TextOptions.fontSize

Source

addons/src/composites/button.ts:33


hidden?

optional hidden: boolean

Is the node, and its children, hidden? (not displayed). Default is false

Inherited from

CompositeOptions.hidden

Source

core/dist/index.d.ts:108


interpolation?

optional interpolation: StringInterpolationMap

Map of placeholders to values for use in string interpolation during localization.

Inherited from

TextOptions.interpolation

Source

core/dist/index.d.ts:2496


isUserInteractionEnabled?

optional isUserInteractionEnabled: boolean

Does the node respond to user events, such as taps? Default is false

Inherited from

CompositeOptions.isUserInteractionEnabled

Source

core/dist/index.d.ts:104


layout?

optional layout: Layout

FOR INTERNAL USE ONLY

Inherited from

CompositeOptions.layout

Source

core/dist/index.d.ts:110


localize?

optional localize: boolean

If true, try to use a localized version of the text. Default is true.

Inherited from

TextOptions.localize

Source

core/dist/index.d.ts:2498


name?

optional name: string

Name of the node. Only needed if the node will be referred to by name in a later function

Inherited from

CompositeOptions.name

Source

core/dist/index.d.ts:94


position?

optional position: Point

Position of the node within its parent coordinate system. Default is (0, 0)

Inherited from

CompositeOptions.position

Source

core/dist/index.d.ts:96


scale?

optional scale: number

Scale of the node. Default is 1.0

Inherited from

CompositeOptions.scale

Source

core/dist/index.d.ts:98


size?

optional size: Size

Size of button. Default is 200 wide by 50 high.

Source

addons/src/composites/button.ts:22


suppressEvents?

optional suppressEvents: boolean

Should the node not emit events to the EventStore? Default is false.

Remarks

This property is for use by authors of Composite nodes. It is not intended for general use.

Inherited from

CompositeOptions.suppressEvents

Source

core/dist/index.d.ts:115


text?

optional text: string

Text to be displayed

Inherited from

TextOptions.text

Source

core/dist/index.d.ts:2488


uuid?

Internal

optional uuid: string

Unique identifier (UUID). Will be generated automatically. For m2c2kit library use only

Inherited from

CompositeOptions.uuid

Source

core/dist/index.d.ts:112


zPosition?

optional zPosition: number

Value along the z-axis to determine drawing and tap order. Larger values are on top.

Inherited from

CompositeOptions.zPosition

Source

core/dist/index.d.ts:45


zRotation?

optional zRotation: number

Rotation of the node around the Z axis. Unit is radians. Default is 0 (no rotation). zRotation has inheritance. In addition to this node's zRotation, all ancestors' zRotations will be applied.

Inherited from

CompositeOptions.zRotation

Source

core/dist/index.d.ts:102