|
@@ -3502,6 +3502,103 @@ declare module "babylonjs-gui/2D/controls/scrollViewers/scrollViewer" {
|
|
|
dispose(): void;
|
|
|
}
|
|
|
}
|
|
|
+declare module "babylonjs-gui/2D/controls/toggleButton" {
|
|
|
+ import { Nullable } from "babylonjs/types";
|
|
|
+ import { Observable } from "babylonjs/Misc/observable";
|
|
|
+ import { Vector2 } from "babylonjs/Maths/math.vector";
|
|
|
+ import { Rectangle } from "babylonjs-gui/2D/controls/rectangle";
|
|
|
+ import { Control } from "babylonjs-gui/2D/controls/control";
|
|
|
+ import { TextBlock } from "babylonjs-gui/2D/controls/textBlock";
|
|
|
+ import { Image } from "babylonjs-gui/2D/controls/image";
|
|
|
+ import { PointerInfoBase } from "babylonjs/Events/pointerEvents";
|
|
|
+ /**
|
|
|
+ * Class used to create toggle buttons
|
|
|
+ */
|
|
|
+ export class ToggleButton extends Rectangle {
|
|
|
+ name?: string | undefined;
|
|
|
+ /**
|
|
|
+ * Function called to generate the toActive animation
|
|
|
+ */
|
|
|
+ toActiveAnimation: () => void;
|
|
|
+ /**
|
|
|
+ * Function called to generate the toInactive animation
|
|
|
+ */
|
|
|
+ toInactiveAnimation: () => void;
|
|
|
+ /**
|
|
|
+ * Function called to generate a pointer enter animation when the toggle button is active.
|
|
|
+ */
|
|
|
+ pointerEnterActiveAnimation: () => void;
|
|
|
+ /**
|
|
|
+ * Function called to generate a pointer out animation when the toggle button is active.
|
|
|
+ */
|
|
|
+ pointerOutActiveAnimation: () => void;
|
|
|
+ /**
|
|
|
+ * Function called to generate a pointer down animation when the toggle button is active.
|
|
|
+ */
|
|
|
+ pointerDownActiveAnimation: () => void;
|
|
|
+ /**
|
|
|
+ * Function called to generate a pointer up animation when the toggle button is active.
|
|
|
+ */
|
|
|
+ pointerUpActiveAnimation: () => void;
|
|
|
+ /**
|
|
|
+ * Function called to generate a pointer enter animation when the toggle button is inactive.
|
|
|
+ */
|
|
|
+ pointerEnterInactiveAnimation: () => void;
|
|
|
+ /**
|
|
|
+ * Function called to generate a pointer out animation when the toggle button is inactive.
|
|
|
+ */
|
|
|
+ pointerOutInactiveAnimation: () => void;
|
|
|
+ /**
|
|
|
+ * Function called to generate a pointer down animation when the toggle button is inactive.
|
|
|
+ */
|
|
|
+ pointerDownInactiveAnimation: () => void;
|
|
|
+ /**
|
|
|
+ * Function called to generate a pointer up animation when the toggle button is inactive.
|
|
|
+ */
|
|
|
+ pointerUpInactiveAnimation: () => void;
|
|
|
+ /** Observable raised when isActive is changed */
|
|
|
+ onIsActiveChangedObservable: Observable<boolean>;
|
|
|
+ /**
|
|
|
+ * Gets or sets a boolean indicating that the toggle button will let internal controls handle picking instead of doing it directly using its bounding info
|
|
|
+ */
|
|
|
+ delegatePickingToChildren: boolean;
|
|
|
+ private _image;
|
|
|
+ /**
|
|
|
+ * Returns the ToggleButton's image control if it exists
|
|
|
+ */
|
|
|
+ get image(): Nullable<Image>;
|
|
|
+ private _textBlock;
|
|
|
+ /**
|
|
|
+ * Returns the ToggleButton's child TextBlock control if it exists
|
|
|
+ */
|
|
|
+ get textBlock(): Nullable<TextBlock>;
|
|
|
+ private _group;
|
|
|
+ /** Gets or sets group name this toggle button belongs to */
|
|
|
+ get group(): string;
|
|
|
+ set group(value: string);
|
|
|
+ private _isActive;
|
|
|
+ /** Gets or sets a boolean indicating if the toogle button is active or not */
|
|
|
+ get isActive(): boolean;
|
|
|
+ set isActive(value: boolean);
|
|
|
+ /**
|
|
|
+ * Creates a new ToggleButton
|
|
|
+ * @param name defines the control name
|
|
|
+ * @param group defines the toggle group this toggle belongs to
|
|
|
+ */
|
|
|
+ constructor(name?: string | undefined, group?: string);
|
|
|
+ protected _getTypeName(): string;
|
|
|
+ /** @hidden */
|
|
|
+ _processPicking(x: number, y: number, pi: PointerInfoBase, type: number, pointerId: number, buttonIndex: number, deltaX?: number, deltaY?: number): boolean;
|
|
|
+ /** @hidden */
|
|
|
+ _onPointerEnter(target: Control, pi: PointerInfoBase): boolean;
|
|
|
+ /** @hidden */
|
|
|
+ _onPointerOut(target: Control, pi: PointerInfoBase, force?: boolean): void;
|
|
|
+ /** @hidden */
|
|
|
+ _onPointerDown(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number, pi: PointerInfoBase): boolean;
|
|
|
+ /** @hidden */
|
|
|
+ _onPointerUp(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number, notifyClick: boolean, pi: PointerInfoBase): void;
|
|
|
+ }
|
|
|
+}
|
|
|
declare module "babylonjs-gui/2D/controls/displayGrid" {
|
|
|
import { Control } from "babylonjs-gui/2D/controls/control";
|
|
|
import { Nullable } from 'babylonjs/types';
|
|
@@ -3626,6 +3723,7 @@ declare module "babylonjs-gui/2D/controls/index" {
|
|
|
export * from "babylonjs-gui/2D/controls/scrollViewers/scrollViewer";
|
|
|
export * from "babylonjs-gui/2D/controls/textBlock";
|
|
|
export * from "babylonjs-gui/2D/controls/textWrapper";
|
|
|
+ export * from "babylonjs-gui/2D/controls/toggleButton";
|
|
|
export * from "babylonjs-gui/2D/controls/virtualKeyboard";
|
|
|
export * from "babylonjs-gui/2D/controls/rectangle";
|
|
|
export * from "babylonjs-gui/2D/controls/displayGrid";
|
|
@@ -7902,6 +8000,95 @@ declare module BABYLON.GUI {
|
|
|
}
|
|
|
}
|
|
|
declare module BABYLON.GUI {
|
|
|
+ /**
|
|
|
+ * Class used to create toggle buttons
|
|
|
+ */
|
|
|
+ export class ToggleButton extends Rectangle {
|
|
|
+ name?: string | undefined;
|
|
|
+ /**
|
|
|
+ * Function called to generate the toActive animation
|
|
|
+ */
|
|
|
+ toActiveAnimation: () => void;
|
|
|
+ /**
|
|
|
+ * Function called to generate the toInactive animation
|
|
|
+ */
|
|
|
+ toInactiveAnimation: () => void;
|
|
|
+ /**
|
|
|
+ * Function called to generate a pointer enter animation when the toggle button is active.
|
|
|
+ */
|
|
|
+ pointerEnterActiveAnimation: () => void;
|
|
|
+ /**
|
|
|
+ * Function called to generate a pointer out animation when the toggle button is active.
|
|
|
+ */
|
|
|
+ pointerOutActiveAnimation: () => void;
|
|
|
+ /**
|
|
|
+ * Function called to generate a pointer down animation when the toggle button is active.
|
|
|
+ */
|
|
|
+ pointerDownActiveAnimation: () => void;
|
|
|
+ /**
|
|
|
+ * Function called to generate a pointer up animation when the toggle button is active.
|
|
|
+ */
|
|
|
+ pointerUpActiveAnimation: () => void;
|
|
|
+ /**
|
|
|
+ * Function called to generate a pointer enter animation when the toggle button is inactive.
|
|
|
+ */
|
|
|
+ pointerEnterInactiveAnimation: () => void;
|
|
|
+ /**
|
|
|
+ * Function called to generate a pointer out animation when the toggle button is inactive.
|
|
|
+ */
|
|
|
+ pointerOutInactiveAnimation: () => void;
|
|
|
+ /**
|
|
|
+ * Function called to generate a pointer down animation when the toggle button is inactive.
|
|
|
+ */
|
|
|
+ pointerDownInactiveAnimation: () => void;
|
|
|
+ /**
|
|
|
+ * Function called to generate a pointer up animation when the toggle button is inactive.
|
|
|
+ */
|
|
|
+ pointerUpInactiveAnimation: () => void;
|
|
|
+ /** BABYLON.Observable raised when isActive is changed */
|
|
|
+ onIsActiveChangedObservable: BABYLON.Observable<boolean>;
|
|
|
+ /**
|
|
|
+ * Gets or sets a boolean indicating that the toggle button will let internal controls handle picking instead of doing it directly using its bounding info
|
|
|
+ */
|
|
|
+ delegatePickingToChildren: boolean;
|
|
|
+ private _image;
|
|
|
+ /**
|
|
|
+ * Returns the ToggleButton's image control if it exists
|
|
|
+ */
|
|
|
+ get image(): BABYLON.Nullable<Image>;
|
|
|
+ private _textBlock;
|
|
|
+ /**
|
|
|
+ * Returns the ToggleButton's child TextBlock control if it exists
|
|
|
+ */
|
|
|
+ get textBlock(): BABYLON.Nullable<TextBlock>;
|
|
|
+ private _group;
|
|
|
+ /** Gets or sets group name this toggle button belongs to */
|
|
|
+ get group(): string;
|
|
|
+ set group(value: string);
|
|
|
+ private _isActive;
|
|
|
+ /** Gets or sets a boolean indicating if the toogle button is active or not */
|
|
|
+ get isActive(): boolean;
|
|
|
+ set isActive(value: boolean);
|
|
|
+ /**
|
|
|
+ * Creates a new ToggleButton
|
|
|
+ * @param name defines the control name
|
|
|
+ * @param group defines the toggle group this toggle belongs to
|
|
|
+ */
|
|
|
+ constructor(name?: string | undefined, group?: string);
|
|
|
+ protected _getTypeName(): string;
|
|
|
+ /** @hidden */
|
|
|
+ _processPicking(x: number, y: number, pi: BABYLON.PointerInfoBase, type: number, pointerId: number, buttonIndex: number, deltaX?: number, deltaY?: number): boolean;
|
|
|
+ /** @hidden */
|
|
|
+ _onPointerEnter(target: Control, pi: BABYLON.PointerInfoBase): boolean;
|
|
|
+ /** @hidden */
|
|
|
+ _onPointerOut(target: Control, pi: BABYLON.PointerInfoBase, force?: boolean): void;
|
|
|
+ /** @hidden */
|
|
|
+ _onPointerDown(target: Control, coordinates: BABYLON.Vector2, pointerId: number, buttonIndex: number, pi: BABYLON.PointerInfoBase): boolean;
|
|
|
+ /** @hidden */
|
|
|
+ _onPointerUp(target: Control, coordinates: BABYLON.Vector2, pointerId: number, buttonIndex: number, notifyClick: boolean, pi: BABYLON.PointerInfoBase): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+declare module BABYLON.GUI {
|
|
|
/** Class used to render a grid */
|
|
|
export class DisplayGrid extends Control {
|
|
|
name?: string | undefined;
|