@vrspace/babylonjs
Version:
vrspace.org babylonjs client
38 lines (37 loc) • 1.51 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 to attach to
* @param inputName optional InputText name, displayed TextBlock before the InputText, defaults to "Write"
* @param titleText optional text to display on label above the area
*/
constructor(textArea: any, inputName?: string, titleText?: any);
textArea: any;
/** 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';