@vrspace/babylonjs
Version:
vrspace.org babylonjs client
40 lines (39 loc) • 1.64 kB
TypeScript
/**
* Form attached to TextArea facitilates keyboard input. Contains a TextBlock, InputText and a submit button.
* Scales itself accordingly, and attaches itself below the TextArea.
* Optionally creates a Label and displays it just above the TextArea, as a title.
* Attach text change listeners to be notified on text input.
*/
export class TextAreaInput extends InputForm {
/**
* @param {TextArea} textArea TextArea to attach to
* @param {string} [inputName="Write"] optional InputText name, displayed TextBlock before the InputText, defaults to "Write"
* @param {null} [titleText=null] optional text to display on label above the area
*/
constructor(textArea: TextArea, inputName?: string, titleText?: null);
/** @type TextArea */
textArea: TextArea;
/** Input prefix used as argument to write(), default null */
inputPrefix: any;
/** Allow speech recognition, default true */
speechRecognition: boolean;
/** Print speech mismatch on TextArea, default true */
showNoMatch: boolean;
/** Write the entered text to the area, default true, otherwise just notify listeners */
autoWrite: boolean;
triggerredOnButton: boolean;
/**
* Initialize and attach to the TextArea
*/
init(): void;
processInput(): void;
/**
* Write something to this text area.
* @param what to write
* @param prefix enclosed in square brackets
* @param true clear text input, default true
*/
write(what: any, prefix: any, clear?: boolean): void;
}
import { InputForm } from './input-form.js';
import { TextArea } from './text-area.js';