|
@@ -913,6 +913,7 @@ declare module 'babylonjs-gui/2D/controls/colorpicker' {
|
|
import { Control } from "babylonjs-gui/2D/controls/control";
|
|
import { Control } from "babylonjs-gui/2D/controls/control";
|
|
import { Color3, Observable, Vector2 } from "babylonjs";
|
|
import { Color3, Observable, Vector2 } from "babylonjs";
|
|
import { Measure } from "babylonjs-gui/2D/measure";
|
|
import { Measure } from "babylonjs-gui/2D/measure";
|
|
|
|
+ import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture";
|
|
/** Class used to create color pickers */
|
|
/** Class used to create color pickers */
|
|
export class ColorPicker extends Control {
|
|
export class ColorPicker extends Control {
|
|
name?: string | undefined;
|
|
name?: string | undefined;
|
|
@@ -944,6 +945,26 @@ declare module 'babylonjs-gui/2D/controls/colorpicker' {
|
|
_onPointerDown(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number): boolean;
|
|
_onPointerDown(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number): boolean;
|
|
_onPointerMove(target: Control, coordinates: Vector2): void;
|
|
_onPointerMove(target: Control, coordinates: Vector2): void;
|
|
_onPointerUp(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number, notifyClick: boolean): void;
|
|
_onPointerUp(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number, notifyClick: boolean): void;
|
|
|
|
+ /**
|
|
|
|
+ * This function expands the color picker by creating a color picker dialog with manual
|
|
|
|
+ * color value input and the ability to save colors into an array to be used later in
|
|
|
|
+ * subsequent launches of the dialogue.
|
|
|
|
+ * @param advancedTexture defines the AdvancedDynamicTexture the dialog is assigned to
|
|
|
|
+ * @param options defines size for dialog and options for saved colors. Also accepts last color picked as hex string and saved colors array as hex strings.
|
|
|
|
+ * @returns picked color as a hex string and the saved colors array as hex strings.
|
|
|
|
+ */
|
|
|
|
+ static ShowPickerDialogAsync(advancedTexture: AdvancedDynamicTexture, options: {
|
|
|
|
+ pickerWidth?: string;
|
|
|
|
+ pickerHeight?: string;
|
|
|
|
+ headerHeight?: string;
|
|
|
|
+ lastColor?: string;
|
|
|
|
+ swatchLimit?: number;
|
|
|
|
+ numSwatchesPerLine?: number;
|
|
|
|
+ savedColors?: Array<string>;
|
|
|
|
+ }): Promise<{
|
|
|
|
+ savedColors?: string[];
|
|
|
|
+ pickedColor: string;
|
|
|
|
+ }>;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -4170,6 +4191,26 @@ declare module BABYLON.GUI {
|
|
_onPointerDown(target: Control, coordinates: BABYLON.Vector2, pointerId: number, buttonIndex: number): boolean;
|
|
_onPointerDown(target: Control, coordinates: BABYLON.Vector2, pointerId: number, buttonIndex: number): boolean;
|
|
_onPointerMove(target: Control, coordinates: BABYLON.Vector2): void;
|
|
_onPointerMove(target: Control, coordinates: BABYLON.Vector2): void;
|
|
_onPointerUp(target: Control, coordinates: BABYLON.Vector2, pointerId: number, buttonIndex: number, notifyClick: boolean): void;
|
|
_onPointerUp(target: Control, coordinates: BABYLON.Vector2, pointerId: number, buttonIndex: number, notifyClick: boolean): void;
|
|
|
|
+ /**
|
|
|
|
+ * This function expands the color picker by creating a color picker dialog with manual
|
|
|
|
+ * color value input and the ability to save colors into an array to be used later in
|
|
|
|
+ * subsequent launches of the dialogue.
|
|
|
|
+ * @param advancedTexture defines the AdvancedDynamicTexture the dialog is assigned to
|
|
|
|
+ * @param options defines size for dialog and options for saved colors. Also accepts last color picked as hex string and saved colors array as hex strings.
|
|
|
|
+ * @returns picked color as a hex string and the saved colors array as hex strings.
|
|
|
|
+ */
|
|
|
|
+ static ShowPickerDialogAsync(advancedTexture: AdvancedDynamicTexture, options: {
|
|
|
|
+ pickerWidth?: string;
|
|
|
|
+ pickerHeight?: string;
|
|
|
|
+ headerHeight?: string;
|
|
|
|
+ lastColor?: string;
|
|
|
|
+ swatchLimit?: number;
|
|
|
|
+ numSwatchesPerLine?: number;
|
|
|
|
+ savedColors?: Array<string>;
|
|
|
|
+ }): Promise<{
|
|
|
|
+ savedColors?: string[];
|
|
|
|
+ pickedColor: string;
|
|
|
|
+ }>;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON.GUI {
|
|
declare module BABYLON.GUI {
|