|
@@ -1,6 +1,7 @@
|
|
/*Babylon.js GUI*/
|
|
/*Babylon.js GUI*/
|
|
// Dependencies for this module:
|
|
// Dependencies for this module:
|
|
// ../../../../Tools/Gulp/babylonjs
|
|
// ../../../../Tools/Gulp/babylonjs
|
|
|
|
+// ../../../../Tools/Gulp/2D
|
|
declare module BABYLON.GUI {
|
|
declare module BABYLON.GUI {
|
|
}
|
|
}
|
|
declare module BABYLON.GUI {
|
|
declare module BABYLON.GUI {
|
|
@@ -60,8 +61,6 @@ declare module BABYLON.GUI {
|
|
_layerToDispose: BABYLON.Nullable<BABYLON.Layer>;
|
|
_layerToDispose: BABYLON.Nullable<BABYLON.Layer>;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
_linkedControls: Control[];
|
|
_linkedControls: Control[];
|
|
- /** @hidden */
|
|
|
|
- _needRedraw: boolean;
|
|
|
|
/**
|
|
/**
|
|
* BABYLON.Observable event triggered each time an clipboard event is received from the rendering canvas
|
|
* BABYLON.Observable event triggered each time an clipboard event is received from the rendering canvas
|
|
*/
|
|
*/
|
|
@@ -71,6 +70,22 @@ declare module BABYLON.GUI {
|
|
*/
|
|
*/
|
|
onControlPickedObservable: BABYLON.Observable<Control>;
|
|
onControlPickedObservable: BABYLON.Observable<Control>;
|
|
/**
|
|
/**
|
|
|
|
+ * BABYLON.Observable event triggered before layout is evaluated
|
|
|
|
+ */
|
|
|
|
+ onBeginLayoutObservable: BABYLON.Observable<AdvancedDynamicTexture>;
|
|
|
|
+ /**
|
|
|
|
+ * BABYLON.Observable event triggered after the layout was evaluated
|
|
|
|
+ */
|
|
|
|
+ onEndLayoutObservable: BABYLON.Observable<AdvancedDynamicTexture>;
|
|
|
|
+ /**
|
|
|
|
+ * BABYLON.Observable event triggered before the texture is rendered
|
|
|
|
+ */
|
|
|
|
+ onBeginRenderObservable: BABYLON.Observable<AdvancedDynamicTexture>;
|
|
|
|
+ /**
|
|
|
|
+ * BABYLON.Observable event triggered after the texture was rendered
|
|
|
|
+ */
|
|
|
|
+ onEndRenderObservable: BABYLON.Observable<AdvancedDynamicTexture>;
|
|
|
|
+ /**
|
|
* Gets or sets a boolean defining if alpha is stored as premultiplied
|
|
* Gets or sets a boolean defining if alpha is stored as premultiplied
|
|
*/
|
|
*/
|
|
premulAlpha: boolean;
|
|
premulAlpha: boolean;
|
|
@@ -250,6 +265,47 @@ declare module BABYLON.GUI {
|
|
}
|
|
}
|
|
declare module BABYLON.GUI {
|
|
declare module BABYLON.GUI {
|
|
/**
|
|
/**
|
|
|
|
+ * This class can be used to get instrumentation data from a AdvancedDynamicTexture object
|
|
|
|
+ */
|
|
|
|
+ export class AdvancedDynamicTextureInstrumentation implements BABYLON.IDisposable {
|
|
|
|
+ /**
|
|
|
|
+ * Define the instrumented AdvancedDynamicTexture.
|
|
|
|
+ */
|
|
|
|
+ texture: AdvancedDynamicTexture;
|
|
|
|
+ /**
|
|
|
|
+ * Gets the perf counter used to capture render time
|
|
|
|
+ */
|
|
|
|
+ readonly renderTimeCounter: BABYLON.PerfCounter;
|
|
|
|
+ /**
|
|
|
|
+ * Gets the perf counter used to capture layout time
|
|
|
|
+ */
|
|
|
|
+ readonly layoutTimeCounter: BABYLON.PerfCounter;
|
|
|
|
+ /**
|
|
|
|
+ * Enable or disable the render time capture
|
|
|
|
+ */
|
|
|
|
+ captureRenderTime: boolean;
|
|
|
|
+ /**
|
|
|
|
+ * Enable or disable the layout time capture
|
|
|
|
+ */
|
|
|
|
+ captureLayoutTime: boolean;
|
|
|
|
+ /**
|
|
|
|
+ * Instantiates a new advanced dynamic texture instrumentation.
|
|
|
|
+ * This class can be used to get instrumentation data from an AdvancedDynamicTexture object
|
|
|
|
+ * @param texture Defines the AdvancedDynamicTexture to instrument
|
|
|
|
+ */
|
|
|
|
+ constructor(
|
|
|
|
+ /**
|
|
|
|
+ * Define the instrumented AdvancedDynamicTexture.
|
|
|
|
+ */
|
|
|
|
+ texture: AdvancedDynamicTexture);
|
|
|
|
+ /**
|
|
|
|
+ * Dispose and release associated resources.
|
|
|
|
+ */
|
|
|
|
+ dispose(): void;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+declare module BABYLON.GUI {
|
|
|
|
+ /**
|
|
* Class used to transport BABYLON.Vector2 information for pointer events
|
|
* Class used to transport BABYLON.Vector2 information for pointer events
|
|
*/
|
|
*/
|
|
export class Vector2WithInfo extends BABYLON.Vector2 {
|
|
export class Vector2WithInfo extends BABYLON.Vector2 {
|
|
@@ -516,6 +572,13 @@ declare module BABYLON.GUI {
|
|
*/
|
|
*/
|
|
getValueInPixel(host: AdvancedDynamicTexture, refValue: number): number;
|
|
getValueInPixel(host: AdvancedDynamicTexture, refValue: number): number;
|
|
/**
|
|
/**
|
|
|
|
+ * Update the current value and unit. This should be done cautiously as the GUi won't be marked as dirty with this function.
|
|
|
|
+ * @param value defines the value to store
|
|
|
|
+ * @param unit defines the unit to store
|
|
|
|
+ * @returns the current ValueAndUnit
|
|
|
|
+ */
|
|
|
|
+ updateInPlace(value: number, unit?: number): ValueAndUnit;
|
|
|
|
+ /**
|
|
* Gets the value accordingly to its unit
|
|
* Gets the value accordingly to its unit
|
|
* @param host defines the root host
|
|
* @param host defines the root host
|
|
* @returns the value
|
|
* @returns the value
|
|
@@ -724,7 +787,7 @@ declare module BABYLON.GUI {
|
|
constructor(name?: string | undefined);
|
|
constructor(name?: string | undefined);
|
|
protected _getTypeName(): string;
|
|
protected _getTypeName(): string;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
- _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
|
|
|
|
+ _draw(context: CanvasRenderingContext2D): void;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
_onPointerDown(target: Control, coordinates: BABYLON.Vector2, pointerId: number, buttonIndex: number): boolean;
|
|
_onPointerDown(target: Control, coordinates: BABYLON.Vector2, pointerId: number, buttonIndex: number): boolean;
|
|
/**
|
|
/**
|
|
@@ -746,7 +809,10 @@ declare module BABYLON.GUI {
|
|
onValueChangedObservable: BABYLON.Observable<BABYLON.Color3>;
|
|
onValueChangedObservable: BABYLON.Observable<BABYLON.Color3>;
|
|
/** Gets or sets the color of the color picker */
|
|
/** Gets or sets the color of the color picker */
|
|
value: BABYLON.Color3;
|
|
value: BABYLON.Color3;
|
|
- /** Gets or sets control width */
|
|
|
|
|
|
+ /**
|
|
|
|
+ * Gets or sets control width
|
|
|
|
+ * @see http://doc.babylonjs.com/how_to/gui#position-and-size
|
|
|
|
+ */
|
|
width: string | number;
|
|
width: string | number;
|
|
/** Gets or sets control height */
|
|
/** Gets or sets control height */
|
|
height: string | number;
|
|
height: string | number;
|
|
@@ -759,7 +825,9 @@ declare module BABYLON.GUI {
|
|
constructor(name?: string | undefined);
|
|
constructor(name?: string | undefined);
|
|
protected _getTypeName(): string;
|
|
protected _getTypeName(): string;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
- _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
|
|
|
|
+ protected _preMeasure(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
|
|
+ /** @hidden */
|
|
|
|
+ _draw(context: CanvasRenderingContext2D): void;
|
|
_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;
|
|
@@ -836,20 +904,27 @@ declare module BABYLON.GUI {
|
|
/** @hidden */
|
|
/** @hidden */
|
|
_reOrderControl(control: Control): void;
|
|
_reOrderControl(control: Control): void;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
|
|
+ _offsetLeft(offset: number): void;
|
|
|
|
+ /** @hidden */
|
|
|
|
+ _offsetTop(offset: number): void;
|
|
|
|
+ /** @hidden */
|
|
_markAllAsDirty(): void;
|
|
_markAllAsDirty(): void;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
protected _localDraw(context: CanvasRenderingContext2D): void;
|
|
protected _localDraw(context: CanvasRenderingContext2D): void;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
- _link(root: BABYLON.Nullable<Container>, host: AdvancedDynamicTexture): void;
|
|
|
|
|
|
+ _link(host: AdvancedDynamicTexture): void;
|
|
|
|
+ /** @hidden */
|
|
|
|
+ protected _beforeLayout(): void;
|
|
|
|
+ /** @hidden */
|
|
|
|
+ _layout(parentMeasure: Measure, context: CanvasRenderingContext2D): boolean;
|
|
|
|
+ protected _postMeasure(): void;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
- _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
|
|
|
|
+ _draw(context: CanvasRenderingContext2D): void;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
_getDescendants(results: Control[], directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): void;
|
|
_getDescendants(results: Control[], directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): void;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
_processPicking(x: number, y: number, type: number, pointerId: number, buttonIndex: number): boolean;
|
|
_processPicking(x: number, y: number, type: number, pointerId: number, buttonIndex: number): boolean;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
- protected _clipForChildren(context: CanvasRenderingContext2D): void;
|
|
|
|
- /** @hidden */
|
|
|
|
protected _additionalProcessing(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
protected _additionalProcessing(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
/** Releases associated resources */
|
|
/** Releases associated resources */
|
|
dispose(): void;
|
|
dispose(): void;
|
|
@@ -868,8 +943,6 @@ declare module BABYLON.GUI {
|
|
*/
|
|
*/
|
|
static AllowAlphaInheritance: boolean;
|
|
static AllowAlphaInheritance: boolean;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
- _root: BABYLON.Nullable<Container>;
|
|
|
|
- /** @hidden */
|
|
|
|
_host: AdvancedDynamicTexture;
|
|
_host: AdvancedDynamicTexture;
|
|
/** Gets or sets the control parent */
|
|
/** Gets or sets the control parent */
|
|
parent: BABYLON.Nullable<Container>;
|
|
parent: BABYLON.Nullable<Container>;
|
|
@@ -890,6 +963,10 @@ declare module BABYLON.GUI {
|
|
/** @hidden */
|
|
/** @hidden */
|
|
protected _verticalAlignment: number;
|
|
protected _verticalAlignment: number;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
|
|
+ protected _isDirty: boolean;
|
|
|
|
+ /** @hidden */
|
|
|
|
+ protected _wasDirty: boolean;
|
|
|
|
+ /** @hidden */
|
|
_tempParentMeasure: Measure;
|
|
_tempParentMeasure: Measure;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
protected _cachedParentMeasure: Measure;
|
|
protected _cachedParentMeasure: Measure;
|
|
@@ -906,6 +983,10 @@ declare module BABYLON.GUI {
|
|
protected _isEnabled: boolean;
|
|
protected _isEnabled: boolean;
|
|
protected _disabledColor: string;
|
|
protected _disabledColor: string;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
|
|
+ protected _rebuildLayout: boolean;
|
|
|
|
+ /** @hidden */
|
|
|
|
+ _isClipped: boolean;
|
|
|
|
+ /** @hidden */
|
|
_tag: any;
|
|
_tag: any;
|
|
/**
|
|
/**
|
|
* Gets or sets the unique id of the node. Please note that this number will be updated when the control is added to a container
|
|
* Gets or sets the unique id of the node. Please note that this number will be updated when the control is added to a container
|
|
@@ -923,6 +1004,10 @@ declare module BABYLON.GUI {
|
|
isFocusInvisible: boolean;
|
|
isFocusInvisible: boolean;
|
|
/** Gets or sets a boolean indicating if the children are clipped to the current control bounds */
|
|
/** Gets or sets a boolean indicating if the children are clipped to the current control bounds */
|
|
clipChildren: boolean;
|
|
clipChildren: boolean;
|
|
|
|
+ /**
|
|
|
|
+ * Gets or sets a boolean indicating that the current control should cache its rendering (useful when the control does not change often)
|
|
|
|
+ */
|
|
|
|
+ useBitmapCache: boolean;
|
|
/** Gets or sets a value indicating the offset to apply on X axis to render the shadow */
|
|
/** Gets or sets a value indicating the offset to apply on X axis to render the shadow */
|
|
shadowOffsetX: number;
|
|
shadowOffsetX: number;
|
|
/** Gets or sets a value indicating the offset to apply on Y axis to render the shadow */
|
|
/** Gets or sets a value indicating the offset to apply on Y axis to render the shadow */
|
|
@@ -980,6 +1065,10 @@ declare module BABYLON.GUI {
|
|
* An event triggered after the control was drawn
|
|
* An event triggered after the control was drawn
|
|
*/
|
|
*/
|
|
onAfterDrawObservable: BABYLON.Observable<Control>;
|
|
onAfterDrawObservable: BABYLON.Observable<Control>;
|
|
|
|
+ /**
|
|
|
|
+ * Get the hosting AdvancedDynamicTexture
|
|
|
|
+ */
|
|
|
|
+ readonly host: AdvancedDynamicTexture;
|
|
/** Gets or set information about font offsets (used to render and align text) */
|
|
/** Gets or set information about font offsets (used to render and align text) */
|
|
fontOffset: {
|
|
fontOffset: {
|
|
ascent: number;
|
|
ascent: number;
|
|
@@ -1170,6 +1259,12 @@ declare module BABYLON.GUI {
|
|
name?: string | undefined);
|
|
name?: string | undefined);
|
|
/** @hidden */
|
|
/** @hidden */
|
|
protected _getTypeName(): string;
|
|
protected _getTypeName(): string;
|
|
|
|
+ /**
|
|
|
|
+ * Gets the first ascendant in the hierarchy of the given type
|
|
|
|
+ * @param className defines the required type
|
|
|
|
+ * @returns the ascendant or null if not found
|
|
|
|
+ */
|
|
|
|
+ getAscendantOfClass(className: string): BABYLON.Nullable<Control>;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
_resetFontCache(): void;
|
|
_resetFontCache(): void;
|
|
/**
|
|
/**
|
|
@@ -1221,6 +1316,10 @@ declare module BABYLON.GUI {
|
|
/** @hidden */
|
|
/** @hidden */
|
|
_moveToProjectedPosition(projectedPosition: BABYLON.Vector3): void;
|
|
_moveToProjectedPosition(projectedPosition: BABYLON.Vector3): void;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
|
|
+ _offsetLeft(offset: number): void;
|
|
|
|
+ /** @hidden */
|
|
|
|
+ _offsetTop(offset: number): void;
|
|
|
|
+ /** @hidden */
|
|
_markMatrixAsDirty(): void;
|
|
_markMatrixAsDirty(): void;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
_flagDescendantsAsMatrixDirty(): void;
|
|
_flagDescendantsAsMatrixDirty(): void;
|
|
@@ -1229,19 +1328,19 @@ declare module BABYLON.GUI {
|
|
/** @hidden */
|
|
/** @hidden */
|
|
_markAllAsDirty(): void;
|
|
_markAllAsDirty(): void;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
- _link(root: BABYLON.Nullable<Container>, host: AdvancedDynamicTexture): void;
|
|
|
|
|
|
+ _link(host: AdvancedDynamicTexture): void;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
protected _transform(context: CanvasRenderingContext2D): void;
|
|
protected _transform(context: CanvasRenderingContext2D): void;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
_renderHighlight(context: CanvasRenderingContext2D): void;
|
|
_renderHighlight(context: CanvasRenderingContext2D): void;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
- protected _renderHighlightSpecific(context: CanvasRenderingContext2D): void;
|
|
|
|
|
|
+ _renderHighlightSpecific(context: CanvasRenderingContext2D): void;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
protected _applyStates(context: CanvasRenderingContext2D): void;
|
|
protected _applyStates(context: CanvasRenderingContext2D): void;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
- protected _processMeasures(parentMeasure: Measure, context: CanvasRenderingContext2D): boolean;
|
|
|
|
|
|
+ _layout(parentMeasure: Measure, context: CanvasRenderingContext2D): boolean;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
- protected _clip(context: CanvasRenderingContext2D): void;
|
|
|
|
|
|
+ protected _processMeasures(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
_measure(): void;
|
|
_measure(): void;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
@@ -1251,7 +1350,11 @@ declare module BABYLON.GUI {
|
|
/** @hidden */
|
|
/** @hidden */
|
|
protected _additionalProcessing(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
protected _additionalProcessing(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
- _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
|
|
|
|
+ protected _clipForChildren(context: CanvasRenderingContext2D): void;
|
|
|
|
+ /** @hidden */
|
|
|
|
+ _render(context: CanvasRenderingContext2D): boolean;
|
|
|
|
+ /** @hidden */
|
|
|
|
+ _draw(context: CanvasRenderingContext2D): void;
|
|
/**
|
|
/**
|
|
* Tests if a given coordinates belong to the current control
|
|
* Tests if a given coordinates belong to the current control
|
|
* @param x defines x coordinate to test
|
|
* @param x defines x coordinate to test
|
|
@@ -1347,6 +1450,18 @@ declare module BABYLON.GUI {
|
|
/** Gets the list of children */
|
|
/** Gets the list of children */
|
|
readonly children: Control[];
|
|
readonly children: Control[];
|
|
/**
|
|
/**
|
|
|
|
+ * Gets the definition of a specific row
|
|
|
|
+ * @param index defines the index of the row
|
|
|
|
+ * @returns the row definition
|
|
|
|
+ */
|
|
|
|
+ getRowDefinition(index: number): BABYLON.Nullable<ValueAndUnit>;
|
|
|
|
+ /**
|
|
|
|
+ * Gets the definition of a specific column
|
|
|
|
+ * @param index defines the index of the column
|
|
|
|
+ * @returns the column definition
|
|
|
|
+ */
|
|
|
|
+ getColumnDefinition(index: number): BABYLON.Nullable<ValueAndUnit>;
|
|
|
|
+ /**
|
|
* Adds a new row to the grid
|
|
* Adds a new row to the grid
|
|
* @param height defines the height of the row (either in pixel or a value between 0 and 1)
|
|
* @param height defines the height of the row (either in pixel or a value between 0 and 1)
|
|
* @param isPixel defines if the height is expressed in pixel (or in percentage)
|
|
* @param isPixel defines if the height is expressed in pixel (or in percentage)
|
|
@@ -1384,6 +1499,12 @@ declare module BABYLON.GUI {
|
|
*/
|
|
*/
|
|
getChildrenAt(row: number, column: number): BABYLON.Nullable<Array<Control>>;
|
|
getChildrenAt(row: number, column: number): BABYLON.Nullable<Array<Control>>;
|
|
/**
|
|
/**
|
|
|
|
+ * Gets a string representing the child cell info (row x column)
|
|
|
|
+ * @param child defines the control to get info from
|
|
|
|
+ * @returns a string containing the child cell info (row x column)
|
|
|
|
+ */
|
|
|
|
+ getChildCellInfo(child: Control): string;
|
|
|
|
+ /**
|
|
* Remove a column definition at specified index
|
|
* Remove a column definition at specified index
|
|
* @param index defines the index of the column to remove
|
|
* @param index defines the index of the column to remove
|
|
* @returns the current grid
|
|
* @returns the current grid
|
|
@@ -1418,7 +1539,7 @@ declare module BABYLON.GUI {
|
|
protected _getGridDefinitions(definitionCallback: (lefts: number[], tops: number[], widths: number[], heights: number[]) => void): void;
|
|
protected _getGridDefinitions(definitionCallback: (lefts: number[], tops: number[], widths: number[], heights: number[]) => void): void;
|
|
protected _additionalProcessing(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
protected _additionalProcessing(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
_flagDescendantsAsMatrixDirty(): void;
|
|
_flagDescendantsAsMatrixDirty(): void;
|
|
- protected _renderHighlightSpecific(context: CanvasRenderingContext2D): void;
|
|
|
|
|
|
+ _renderHighlightSpecific(context: CanvasRenderingContext2D): void;
|
|
/** Releases associated resources */
|
|
/** Releases associated resources */
|
|
dispose(): void;
|
|
dispose(): void;
|
|
}
|
|
}
|
|
@@ -1438,6 +1559,26 @@ declare module BABYLON.GUI {
|
|
*/
|
|
*/
|
|
readonly isLoaded: boolean;
|
|
readonly isLoaded: boolean;
|
|
/**
|
|
/**
|
|
|
|
+ * Gets or sets a boolean indicating if nine patch slices (left, top, right, bottom) should be read from image data
|
|
|
|
+ */
|
|
|
|
+ populateNinePatchSlicesFromImage: boolean;
|
|
|
|
+ /**
|
|
|
|
+ * Gets or sets the left value for slicing (9-patch)
|
|
|
|
+ */
|
|
|
|
+ sliceLeft: number;
|
|
|
|
+ /**
|
|
|
|
+ * Gets or sets the right value for slicing (9-patch)
|
|
|
|
+ */
|
|
|
|
+ sliceRight: number;
|
|
|
|
+ /**
|
|
|
|
+ * Gets or sets the top value for slicing (9-patch)
|
|
|
|
+ */
|
|
|
|
+ sliceTop: number;
|
|
|
|
+ /**
|
|
|
|
+ * Gets or sets the bottom value for slicing (9-patch)
|
|
|
|
+ */
|
|
|
|
+ sliceBottom: number;
|
|
|
|
+ /**
|
|
* Gets or sets the left coordinate in the source image
|
|
* Gets or sets the left coordinate in the source image
|
|
*/
|
|
*/
|
|
sourceLeft: number;
|
|
sourceLeft: number;
|
|
@@ -1492,7 +1633,8 @@ declare module BABYLON.GUI {
|
|
protected _getTypeName(): string;
|
|
protected _getTypeName(): string;
|
|
/** Force the control to synchronize with its content */
|
|
/** Force the control to synchronize with its content */
|
|
synchronizeSizeWithContent(): void;
|
|
synchronizeSizeWithContent(): void;
|
|
- _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
|
|
|
|
+ protected _processMeasures(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
|
|
+ _draw(context: CanvasRenderingContext2D): void;
|
|
dispose(): void;
|
|
dispose(): void;
|
|
/** STRETCH_NONE */
|
|
/** STRETCH_NONE */
|
|
static readonly STRETCH_NONE: number;
|
|
static readonly STRETCH_NONE: number;
|
|
@@ -1502,6 +1644,8 @@ declare module BABYLON.GUI {
|
|
static readonly STRETCH_UNIFORM: number;
|
|
static readonly STRETCH_UNIFORM: number;
|
|
/** STRETCH_EXTEND */
|
|
/** STRETCH_EXTEND */
|
|
static readonly STRETCH_EXTEND: number;
|
|
static readonly STRETCH_EXTEND: number;
|
|
|
|
+ /** NINE_PATCH */
|
|
|
|
+ static readonly STRETCH_NINE_PATCH: number;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON.GUI {
|
|
declare module BABYLON.GUI {
|
|
@@ -1530,6 +1674,8 @@ declare module BABYLON.GUI {
|
|
onTextCutObservable: BABYLON.Observable<InputText>;
|
|
onTextCutObservable: BABYLON.Observable<InputText>;
|
|
/** BABYLON.Observable raised when paste event is triggered */
|
|
/** BABYLON.Observable raised when paste event is triggered */
|
|
onTextPasteObservable: BABYLON.Observable<InputText>;
|
|
onTextPasteObservable: BABYLON.Observable<InputText>;
|
|
|
|
+ /** BABYLON.Observable raised when a key event was processed */
|
|
|
|
+ onKeyboardEventProcessedObservable: BABYLON.Observable<KeyboardEvent>;
|
|
/** Gets or sets the maximum width allowed by the control */
|
|
/** Gets or sets the maximum width allowed by the control */
|
|
maxWidth: string | number;
|
|
maxWidth: string | number;
|
|
/** Gets the maximum width allowed by the control in pixels */
|
|
/** Gets the maximum width allowed by the control in pixels */
|
|
@@ -1550,6 +1696,8 @@ declare module BABYLON.GUI {
|
|
thickness: number;
|
|
thickness: number;
|
|
/** Gets or sets the background color when focused */
|
|
/** Gets or sets the background color when focused */
|
|
focusedBackground: string;
|
|
focusedBackground: string;
|
|
|
|
+ /** Gets or sets the background color when focused */
|
|
|
|
+ focusedColor: string;
|
|
/** Gets or sets the background color */
|
|
/** Gets or sets the background color */
|
|
background: string;
|
|
background: string;
|
|
/** Gets or sets the placeholder color */
|
|
/** Gets or sets the placeholder color */
|
|
@@ -1591,8 +1739,9 @@ declare module BABYLON.GUI {
|
|
* @param evt Defines the KeyboardEvent
|
|
* @param evt Defines the KeyboardEvent
|
|
*/
|
|
*/
|
|
processKeyboard(evt: KeyboardEvent): void;
|
|
processKeyboard(evt: KeyboardEvent): void;
|
|
- _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
|
|
|
|
+ _draw(context: CanvasRenderingContext2D): void;
|
|
_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;
|
|
_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;
|
|
protected _beforeRenderText(text: string): string;
|
|
protected _beforeRenderText(text: string): string;
|
|
dispose(): void;
|
|
dispose(): void;
|
|
@@ -1634,7 +1783,7 @@ declare module BABYLON.GUI {
|
|
*/
|
|
*/
|
|
constructor(name?: string | undefined);
|
|
constructor(name?: string | undefined);
|
|
protected _getTypeName(): string;
|
|
protected _getTypeName(): string;
|
|
- _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
|
|
|
|
+ _draw(context: CanvasRenderingContext2D): void;
|
|
_measure(): void;
|
|
_measure(): void;
|
|
protected _computeAlignment(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
protected _computeAlignment(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
/**
|
|
/**
|
|
@@ -1709,7 +1858,7 @@ declare module BABYLON.GUI {
|
|
horizontalAlignment: number;
|
|
horizontalAlignment: number;
|
|
verticalAlignment: number;
|
|
verticalAlignment: number;
|
|
protected _getTypeName(): string;
|
|
protected _getTypeName(): string;
|
|
- _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
|
|
|
|
+ _draw(context: CanvasRenderingContext2D): void;
|
|
protected _additionalProcessing(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
protected _additionalProcessing(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
_measure(): void;
|
|
_measure(): void;
|
|
protected _computeAlignment(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
protected _computeAlignment(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
@@ -1740,7 +1889,7 @@ declare module BABYLON.GUI {
|
|
*/
|
|
*/
|
|
constructor(name?: string | undefined);
|
|
constructor(name?: string | undefined);
|
|
protected _getTypeName(): string;
|
|
protected _getTypeName(): string;
|
|
- _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
|
|
|
|
+ _draw(context: CanvasRenderingContext2D): void;
|
|
_onPointerDown(target: Control, coordinates: BABYLON.Vector2, pointerId: number, buttonIndex: number): boolean;
|
|
_onPointerDown(target: Control, coordinates: BABYLON.Vector2, pointerId: number, buttonIndex: number): boolean;
|
|
/**
|
|
/**
|
|
* Utility function to easily create a radio button with a header
|
|
* Utility function to easily create a radio button with a header
|
|
@@ -1777,7 +1926,10 @@ declare module BABYLON.GUI {
|
|
*/
|
|
*/
|
|
constructor(name?: string | undefined);
|
|
constructor(name?: string | undefined);
|
|
protected _getTypeName(): string;
|
|
protected _getTypeName(): string;
|
|
|
|
+ /** @hidden */
|
|
protected _preMeasure(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
protected _preMeasure(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
|
|
+ protected _additionalProcessing(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
|
|
+ protected _postMeasure(): void;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON.GUI {
|
|
declare module BABYLON.GUI {
|
|
@@ -1959,68 +2111,54 @@ declare module BABYLON.GUI {
|
|
* Class used to hold a viewer window and sliders in a grid
|
|
* Class used to hold a viewer window and sliders in a grid
|
|
*/
|
|
*/
|
|
export class ScrollViewer extends Rectangle {
|
|
export class ScrollViewer extends Rectangle {
|
|
- /** name of ScrollViewer */
|
|
|
|
- name?: string | undefined;
|
|
|
|
- /**
|
|
|
|
- * Adds windowContents to the grid view window
|
|
|
|
- * @param windowContents the contents to add the grid view window
|
|
|
|
- */
|
|
|
|
- addToWindow(windowContents: Control): void;
|
|
|
|
/**
|
|
/**
|
|
- * Gets or sets a value indicating the padding to use on the left of the viewer window
|
|
|
|
- * @see http://doc.babylonjs.com/how_to/gui#position-and-size
|
|
|
|
- */
|
|
|
|
- paddingLeft: string | number;
|
|
|
|
- /**
|
|
|
|
- * Gets a value indicating the padding in pixels to use on the left of the viewer window
|
|
|
|
- * @see http://doc.babylonjs.com/how_to/gui#position-and-size
|
|
|
|
|
|
+ * Gets the horizontal scrollbar
|
|
*/
|
|
*/
|
|
- readonly paddingLeftInPixels: number;
|
|
|
|
|
|
+ readonly horizontalBar: ScrollBar;
|
|
/**
|
|
/**
|
|
- * Gets or sets a value indicating the padding to use on the right of the viewer window
|
|
|
|
- * @see http://doc.babylonjs.com/how_to/gui#position-and-size
|
|
|
|
|
|
+ * Gets the vertical scrollbar
|
|
*/
|
|
*/
|
|
- paddingRight: string | number;
|
|
|
|
|
|
+ readonly verticalBar: ScrollBar;
|
|
/**
|
|
/**
|
|
- * Gets a value indicating the padding in pixels to use on the right of the viewer window
|
|
|
|
- * @see http://doc.babylonjs.com/how_to/gui#position-and-size
|
|
|
|
- */
|
|
|
|
- readonly paddingRightInPixels: number;
|
|
|
|
- /**
|
|
|
|
- * Gets or sets a value indicating the padding to use on the top of the viewer window
|
|
|
|
- * @see http://doc.babylonjs.com/how_to/gui#position-and-size
|
|
|
|
- */
|
|
|
|
- paddingTop: string | number;
|
|
|
|
- /**
|
|
|
|
- * Gets a value indicating the padding in pixels to use on the top of the viewer window
|
|
|
|
- * @see http://doc.babylonjs.com/how_to/gui#position-and-size
|
|
|
|
- */
|
|
|
|
- readonly paddingTopInPixels: number;
|
|
|
|
- /**
|
|
|
|
- * Gets or sets a value indicating the padding to use on the bottom of the viewer window
|
|
|
|
- * @see http://doc.babylonjs.com/how_to/gui#position-and-size
|
|
|
|
|
|
+ * Adds a new control to the current container
|
|
|
|
+ * @param control defines the control to add
|
|
|
|
+ * @returns the current container
|
|
*/
|
|
*/
|
|
- paddingBottom: string | number;
|
|
|
|
|
|
+ addControl(control: BABYLON.Nullable<Control>): Container;
|
|
/**
|
|
/**
|
|
- * Gets a value indicating the padding in pixels to use on the bottom of the viewer window
|
|
|
|
- * @see http://doc.babylonjs.com/how_to/gui#position-and-size
|
|
|
|
|
|
+ * Removes a control from the current container
|
|
|
|
+ * @param control defines the control to remove
|
|
|
|
+ * @returns the current container
|
|
*/
|
|
*/
|
|
- readonly paddingBottomInPixels: number;
|
|
|
|
|
|
+ removeControl(control: Control): Container;
|
|
|
|
+ /** Gets the list of children */
|
|
|
|
+ readonly children: Control[];
|
|
|
|
+ _flagDescendantsAsMatrixDirty(): void;
|
|
/**
|
|
/**
|
|
* Creates a new ScrollViewer
|
|
* Creates a new ScrollViewer
|
|
* @param name of ScrollViewer
|
|
* @param name of ScrollViewer
|
|
*/
|
|
*/
|
|
- constructor(
|
|
|
|
- /** name of ScrollViewer */
|
|
|
|
- name?: string | undefined);
|
|
|
|
|
|
+ constructor(name?: string);
|
|
|
|
+ /** Reset the scroll viewer window to initial size */
|
|
|
|
+ resetWindow(): void;
|
|
|
|
+ protected _getTypeName(): string;
|
|
|
|
+ protected _additionalProcessing(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
|
|
+ protected _postMeasure(): void;
|
|
|
|
+ /**
|
|
|
|
+ * Gets or sets the mouse wheel precision
|
|
|
|
+ * from 0 to 1 with a default value of 0.05
|
|
|
|
+ * */
|
|
|
|
+ wheelPrecision: number;
|
|
/** Gets or sets the bar color */
|
|
/** Gets or sets the bar color */
|
|
barColor: string;
|
|
barColor: string;
|
|
- /** Gets or sets the bar color */
|
|
|
|
- barBorderColor: string;
|
|
|
|
|
|
+ /** Gets or sets the size of the bar */
|
|
|
|
+ barSize: number;
|
|
/** Gets or sets the bar background */
|
|
/** Gets or sets the bar background */
|
|
barBackground: string;
|
|
barBackground: string;
|
|
- /** @hidden */
|
|
|
|
- protected _additionalProcessing(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
|
|
|
|
+ _link(host: AdvancedDynamicTexture): void;
|
|
|
|
+ _renderHighlightSpecific(context: CanvasRenderingContext2D): void;
|
|
|
|
+ /** Releases associated resources */
|
|
|
|
+ dispose(): void;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON.GUI {
|
|
declare module BABYLON.GUI {
|
|
@@ -2104,10 +2242,10 @@ declare module BABYLON.GUI {
|
|
*/
|
|
*/
|
|
name?: string | undefined, text?: string);
|
|
name?: string | undefined, text?: string);
|
|
protected _getTypeName(): string;
|
|
protected _getTypeName(): string;
|
|
|
|
+ protected _processMeasures(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
- _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
|
|
|
|
+ _draw(context: CanvasRenderingContext2D): void;
|
|
protected _applyStates(context: CanvasRenderingContext2D): void;
|
|
protected _applyStates(context: CanvasRenderingContext2D): void;
|
|
- protected _additionalProcessing(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
|
|
protected _breakLines(refWidth: number, context: CanvasRenderingContext2D): object[];
|
|
protected _breakLines(refWidth: number, context: CanvasRenderingContext2D): object[];
|
|
protected _parseLine(line: string | undefined, context: CanvasRenderingContext2D): object;
|
|
protected _parseLine(line: string | undefined, context: CanvasRenderingContext2D): object;
|
|
protected _parseLineEllipsis(line: string | undefined, width: number, context: CanvasRenderingContext2D): object;
|
|
protected _parseLineEllipsis(line: string | undefined, width: number, context: CanvasRenderingContext2D): object;
|
|
@@ -2258,7 +2396,7 @@ declare module BABYLON.GUI {
|
|
* @param name defines the control name
|
|
* @param name defines the control name
|
|
*/
|
|
*/
|
|
constructor(name?: string | undefined);
|
|
constructor(name?: string | undefined);
|
|
- _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
|
|
|
|
+ _draw(context: CanvasRenderingContext2D): void;
|
|
protected _getTypeName(): string;
|
|
protected _getTypeName(): string;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -2310,6 +2448,8 @@ declare module BABYLON.GUI {
|
|
protected _getThumbPosition(): number;
|
|
protected _getThumbPosition(): number;
|
|
protected _getThumbThickness(type: string): number;
|
|
protected _getThumbThickness(type: string): number;
|
|
protected _prepareRenderingData(type: string): void;
|
|
protected _prepareRenderingData(type: string): void;
|
|
|
|
+ /** @hidden */
|
|
|
|
+ protected _updateValueFromPointer(x: number, y: number): void;
|
|
_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;
|
|
@@ -2321,6 +2461,9 @@ declare module BABYLON.GUI {
|
|
*/
|
|
*/
|
|
export class Slider extends BaseSlider {
|
|
export class Slider extends BaseSlider {
|
|
name?: string | undefined;
|
|
name?: string | undefined;
|
|
|
|
+ protected _displayValueBar: boolean;
|
|
|
|
+ /** Gets or sets a boolean indicating if the value bar must be rendered */
|
|
|
|
+ displayValueBar: boolean;
|
|
/** Gets or sets border color */
|
|
/** Gets or sets border color */
|
|
borderColor: string;
|
|
borderColor: string;
|
|
/** Gets or sets background color */
|
|
/** Gets or sets background color */
|
|
@@ -2333,7 +2476,7 @@ declare module BABYLON.GUI {
|
|
*/
|
|
*/
|
|
constructor(name?: string | undefined);
|
|
constructor(name?: string | undefined);
|
|
protected _getTypeName(): string;
|
|
protected _getTypeName(): string;
|
|
- _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
|
|
|
|
+ _draw(context: CanvasRenderingContext2D): void;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON.GUI {
|
|
declare module BABYLON.GUI {
|
|
@@ -2361,7 +2504,7 @@ declare module BABYLON.GUI {
|
|
*/
|
|
*/
|
|
constructor(name?: string | undefined);
|
|
constructor(name?: string | undefined);
|
|
protected _getTypeName(): string;
|
|
protected _getTypeName(): string;
|
|
- _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
|
|
|
|
|
|
+ _draw(context: CanvasRenderingContext2D): void;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON.GUI {
|
|
declare module BABYLON.GUI {
|
|
@@ -2895,4 +3038,27 @@ declare module BABYLON.GUI {
|
|
getClassName(): string;
|
|
getClassName(): string;
|
|
static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): FluentMaterial;
|
|
static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): FluentMaterial;
|
|
}
|
|
}
|
|
|
|
+}
|
|
|
|
+declare module BABYLON.GUI {
|
|
|
|
+ /**
|
|
|
|
+ * Class used to create slider controls
|
|
|
|
+ */
|
|
|
|
+ export class ScrollBar extends BaseSlider {
|
|
|
|
+ name?: string | undefined;
|
|
|
|
+ /** Gets or sets border color */
|
|
|
|
+ borderColor: string;
|
|
|
|
+ /** Gets or sets background color */
|
|
|
|
+ background: string;
|
|
|
|
+ /**
|
|
|
|
+ * Creates a new Slider
|
|
|
|
+ * @param name defines the control name
|
|
|
|
+ */
|
|
|
|
+ constructor(name?: string | undefined);
|
|
|
|
+ protected _getTypeName(): string;
|
|
|
|
+ protected _getThumbThickness(): number;
|
|
|
|
+ _draw(context: CanvasRenderingContext2D): void;
|
|
|
|
+ /** @hidden */
|
|
|
|
+ protected _updateValueFromPointer(x: number, y: number): void;
|
|
|
|
+ _onPointerDown(target: Control, coordinates: BABYLON.Vector2, pointerId: number, buttonIndex: number): boolean;
|
|
|
|
+ }
|
|
}
|
|
}
|