Click
Entity → ceramic.Click (Class)
Implements: tracker.Observable, Component
Component that detects click/tap events on visuals.
This component handles pointer down/up events and emits a click event when the user taps on the visual without moving beyond the threshold.
Instance Members
observedDirty: BoolDefault is false, automatically set to true when any of this instance's observable variables has changed.
threshold: FloatMaximum pointer movement allowed before canceling the click. Set to -1 to disable movement cancellation.
entity: VisualThe visual entity this component is attached to.
pressed: BoolWhether the pointer is currently pressed on this visual.
initializerName: StringinvalidatePressed(): Voidcancel(): VoidCancel the current click operation.
new(): VoidPrivate Members
unobservedPressed: BoolpointerStartX: FloatpointerStartY: FloatEvent when any observable value as changed on this instance.
| Name | Type |
|---|---|
instance |
Click |
fromSerializedField |
Bool |
emitClick(): VoidEvent fired when the visual is clicked/tapped.
Event when pressed field changes.
| Name | Type |
|---|---|
current |
Bool |
previous |
Bool |
bindAsComponent(): Void| Name | Type |
|---|---|
info |
TouchInfo |
| Name | Type |
|---|---|
info |
TouchInfo |
| Name | Type |
|---|---|
info |
TouchInfo |
handleBlur(): Void| Name | Type |
|---|---|
entity |
Entity |
getEntity(): Entity| Returns |
|---|
| Entity |
Metadata
| Name | Parameters |
|---|---|
:build |
tracker.macros.ObservableMacro.build() |
:autoBuild |
tracker.macros.ObservableMacro.build() |
:build |
ceramic.macros.ComponentMacro.build() |
:autoBuild |
ceramic.macros.ComponentMacro.build() |
:build |
ceramic.macros.EntityMacro.buildForCompletion() |
:autoBuild |
ceramic.macros.EntityMacro.buildForCompletion() |
:build |
tracker.macros.EventsMacro.build() |
:autoBuild |
tracker.macros.EventsMacro.build() |