On this page
britzl/defold-input/in.button
Cross-platform input handling for Defold: keyboard, mouse, gamepad, touch, and on-screen controls.
- GitHub: britzl/defold-input — pinned to
2fe3aed- Pick a release from britzl/defold-input releases and add its Source code (zip) URL (or a packaged
.zipasset, if the library ships one) togame.projectunder[project]dependencies, then Fetch Libraries in the Defold editor. - Run
bunx @defold-typescript/cli resolveto materialize its types. - Import it under a namespace alias of your choice:
import * as button from "in.button"
- Pick a release from britzl/defold-input releases and add its Source code (zip) URL (or a packaged
Functions
acquire()
release()
register(node_or_string: Opaque<"node"> | string, callback: () => void): Opaque<"node">
Parameters
node_or_string:Opaque<"node"> | stringcallback:() => void
Returns
Opaque<"node">
unregister(node_or_string?: Opaque<"node"> | string)
Parameters
node_or_string?:Opaque<"node"> | string
dump()
effect(node: Opaque<"node">, initial_scale: Vector3)
Parameters
node:Opaque<"node">initial_scale:Vector3
on_input(action_id: Hash, action: {}): boolean
Parameters
action_id:Hashaction:{}
Returns
boolean