mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-25 03:29:58 -07:00
900 B
900 B
js_gui__byte_input
Byte input GUI view
Displays a keyboard.
let eventLoop = require("event_loop");
let gui = require("gui");
let byteInputView = require("gui/byte_input");
This module depends on the gui module, which in turn depends on the
event_loop module, so they must be imported in this order. It is also
recommended to conceptualize these modules first before using this one.
Example
For an example refer to the gui.js example script.
View props
length
Data buffer length
Type: number
header
Single line of text that appears above the keyboard
Type: string
defaultData
Data to show in byte input by default
Type: Uint8Array | ArrayBuffer
View events
input
Fires when the user selects the "save" button.
Item type: ArrayBuffer