babylonjs-gui 7.12.0 → 7.13.1
Sign up to get free protection for your applications and to get access to all the features.
- package/babylon.gui.d.ts +70 -56
- package/babylon.gui.js +156 -109
- package/babylon.gui.min.js +1 -1
- package/babylon.gui.min.js.map +1 -1
- package/babylon.gui.module.d.ts +142 -117
- package/package.json +2 -2
package/babylon.gui.module.d.ts
CHANGED
@@ -67,7 +67,6 @@ import { Layer } from "babylonjs/Layers/layer";
|
|
67
67
|
import { Scene } from "babylonjs/scene";
|
68
68
|
import { Container } from "babylonjs-gui/2D/controls/container";
|
69
69
|
import { Control } from "babylonjs-gui/2D/controls/control";
|
70
|
-
import { IFocusableControl } from "babylonjs-gui/2D/controls/focusableControl";
|
71
70
|
import { Style } from "babylonjs-gui/2D/style";
|
72
71
|
import { Viewport } from "babylonjs/Maths/math.viewport";
|
73
72
|
/**
|
@@ -178,6 +177,11 @@ export class AdvancedDynamicTexture extends DynamicTexture {
|
|
178
177
|
* Gets or sets a boolean indicating that the canvas must be reverted on Y when updating the texture
|
179
178
|
*/
|
180
179
|
applyYInversionOnUpdate: boolean;
|
180
|
+
/**
|
181
|
+
* A boolean indicating whether or not the elements can be navigated to using the tab key.
|
182
|
+
* Defaults to false.
|
183
|
+
*/
|
184
|
+
disableTabNavigation: boolean;
|
181
185
|
/**
|
182
186
|
* Gets or sets a number used to scale rendering size (2 means that the texture will be twice bigger).
|
183
187
|
* Useful when you want more antialiasing
|
@@ -255,8 +259,8 @@ export class AdvancedDynamicTexture extends DynamicTexture {
|
|
255
259
|
/**
|
256
260
|
* Gets or sets the current focused control
|
257
261
|
*/
|
258
|
-
get focusedControl(): Nullable<
|
259
|
-
set focusedControl(control: Nullable<
|
262
|
+
get focusedControl(): Nullable<Control>;
|
263
|
+
set focusedControl(control: Nullable<Control>);
|
260
264
|
/**
|
261
265
|
* Gets or sets a boolean indicating if the texture must be rendered in background or foreground when in fullscreen mode
|
262
266
|
*/
|
@@ -401,6 +405,7 @@ export class AdvancedDynamicTexture extends DynamicTexture {
|
|
401
405
|
private _translateToPicking;
|
402
406
|
/** Attach to all scene events required to support pointer events */
|
403
407
|
attach(): void;
|
408
|
+
private _focusNextElement;
|
404
409
|
/**
|
405
410
|
* @internal
|
406
411
|
*/
|
@@ -437,7 +442,7 @@ export class AdvancedDynamicTexture extends DynamicTexture {
|
|
437
442
|
* Move the focus to a specific control
|
438
443
|
* @param control defines the control which will receive the focus
|
439
444
|
*/
|
440
|
-
moveFocusToControl(control:
|
445
|
+
moveFocusToControl(control: Control): void;
|
441
446
|
private _manageFocus;
|
442
447
|
private _attachPickingToSceneRender;
|
443
448
|
private _attachToOnPointerOut;
|
@@ -1037,15 +1042,17 @@ import { Style } from "babylonjs-gui/2D/style";
|
|
1037
1042
|
import { Matrix2D, Vector2WithInfo } from "babylonjs-gui/2D/math2D";
|
1038
1043
|
import { ICanvasGradient, ICanvasRenderingContext } from "babylonjs/Engines/ICanvas";
|
1039
1044
|
import { IAccessibilityTag } from "babylonjs/IAccessibilityTag";
|
1045
|
+
import { IKeyboardEvent } from "babylonjs/Events/deviceInputEvents";
|
1040
1046
|
import { IAnimatable } from "babylonjs/Animations/animatable.interface";
|
1041
1047
|
import { Animation } from "babylonjs/Animations/animation";
|
1042
1048
|
import { BaseGradient } from "babylonjs-gui/2D/controls/gradient/BaseGradient";
|
1043
1049
|
import { AbstractEngine } from "babylonjs/Engines/abstractEngine";
|
1050
|
+
import { IFocusableControl } from "babylonjs-gui/2D/controls/focusableControl";
|
1044
1051
|
/**
|
1045
1052
|
* Root class used for all 2D controls
|
1046
1053
|
* @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#controls
|
1047
1054
|
*/
|
1048
|
-
export class Control implements IAnimatable {
|
1055
|
+
export class Control implements IAnimatable, IFocusableControl {
|
1049
1056
|
/** defines the name of the control */
|
1050
1057
|
name?: string | undefined;
|
1051
1058
|
/**
|
@@ -1267,6 +1274,10 @@ export class Control implements IAnimatable {
|
|
1267
1274
|
* An event triggered when a control is clicked on
|
1268
1275
|
*/
|
1269
1276
|
onPointerClickObservable: Observable<Vector2WithInfo>;
|
1277
|
+
/**
|
1278
|
+
* An event triggered when a control receives an ENTER key down event
|
1279
|
+
*/
|
1280
|
+
onEnterPressedObservable: Observable<Control>;
|
1270
1281
|
/**
|
1271
1282
|
* An event triggered when pointer enters the control
|
1272
1283
|
*/
|
@@ -1587,6 +1598,52 @@ export class Control implements IAnimatable {
|
|
1587
1598
|
* Array of animations
|
1588
1599
|
*/
|
1589
1600
|
animations: Nullable<Animation[]>;
|
1601
|
+
protected _focusedColor: Nullable<string>;
|
1602
|
+
/**
|
1603
|
+
* Border color when control is focused
|
1604
|
+
* When not defined the ADT color will be used. If no ADT color is defined, focused state won't have any border
|
1605
|
+
*/
|
1606
|
+
get focusedColor(): Nullable<string>;
|
1607
|
+
set focusedColor(value: Nullable<string>);
|
1608
|
+
/**
|
1609
|
+
* The tab index of this control. -1 indicates this control is not part of the tab navigation.
|
1610
|
+
* A positive value indicates the order of the control in the tab navigation.
|
1611
|
+
* A value of 0 indicated the control will be focused after all controls with a positive index.
|
1612
|
+
* More than one control can have the same tab index and the navigation would then go through all controls with the same value in an order defined by the layout or the hierarchy.
|
1613
|
+
* The value can be changed at any time.
|
1614
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex
|
1615
|
+
*/
|
1616
|
+
tabIndex: number;
|
1617
|
+
protected _isFocused: boolean;
|
1618
|
+
protected _unfocusedColor: Nullable<string>;
|
1619
|
+
/** Observable raised when the control gets the focus */
|
1620
|
+
onFocusObservable: Observable<Control>;
|
1621
|
+
/** Observable raised when the control loses the focus */
|
1622
|
+
onBlurObservable: Observable<Control>;
|
1623
|
+
/** Observable raised when a key event was processed */
|
1624
|
+
onKeyboardEventProcessedObservable: Observable<IKeyboardEvent>;
|
1625
|
+
/** @internal */
|
1626
|
+
onBlur(): void;
|
1627
|
+
/** @internal */
|
1628
|
+
onFocus(): void;
|
1629
|
+
/**
|
1630
|
+
* Function called to get the list of controls that should not steal the focus from this control
|
1631
|
+
* @returns an array of controls
|
1632
|
+
*/
|
1633
|
+
keepsFocusWith(): Nullable<Control[]>;
|
1634
|
+
/**
|
1635
|
+
* Function to focus a button programmatically
|
1636
|
+
*/
|
1637
|
+
focus(): void;
|
1638
|
+
/**
|
1639
|
+
* Function to unfocus a button programmatically
|
1640
|
+
*/
|
1641
|
+
blur(): void;
|
1642
|
+
/**
|
1643
|
+
* Handles the keyboard event
|
1644
|
+
* @param evt Defines the KeyboardEvent
|
1645
|
+
*/
|
1646
|
+
processKeyboard(evt: IKeyboardEvent): void;
|
1590
1647
|
/**
|
1591
1648
|
* Creates a new control
|
1592
1649
|
* @param name defines the name of the control
|
@@ -2000,59 +2057,22 @@ export class Ellipse extends Container {
|
|
2000
2057
|
|
2001
2058
|
}
|
2002
2059
|
declare module "babylonjs-gui/2D/controls/focusableButton" {
|
2003
|
-
import { Nullable } from "babylonjs/types";
|
2004
2060
|
import { Vector2 } from "babylonjs/Maths/math.vector";
|
2005
2061
|
import { Button } from "babylonjs-gui/2D/controls/button";
|
2006
2062
|
import { Control } from "babylonjs-gui/2D/controls/control";
|
2007
2063
|
import { PointerInfoBase } from "babylonjs/Events/pointerEvents";
|
2008
2064
|
import { IFocusableControl } from "babylonjs-gui/2D/controls/focusableControl";
|
2009
|
-
import { Observable } from "babylonjs/Misc/observable";
|
2010
|
-
import { IKeyboardEvent } from "babylonjs/Events/deviceInputEvents";
|
2011
2065
|
/**
|
2012
2066
|
* Class used to create a focusable button that can easily handle keyboard events
|
2013
2067
|
* @since 5.0.0
|
2014
2068
|
*/
|
2015
2069
|
export class FocusableButton extends Button implements IFocusableControl {
|
2016
2070
|
name?: string | undefined;
|
2017
|
-
/** Highlight color when button is focused */
|
2018
|
-
focusedColor: Nullable<string>;
|
2019
|
-
private _isFocused;
|
2020
|
-
private _unfocusedColor;
|
2021
|
-
/** Observable raised when the control gets the focus */
|
2022
|
-
onFocusObservable: Observable<Button>;
|
2023
|
-
/** Observable raised when the control loses the focus */
|
2024
|
-
onBlurObservable: Observable<Button>;
|
2025
|
-
/** Observable raised when a key event was processed */
|
2026
|
-
onKeyboardEventProcessedObservable: Observable<IKeyboardEvent>;
|
2027
2071
|
constructor(name?: string | undefined);
|
2028
|
-
/** @internal */
|
2029
|
-
onBlur(): void;
|
2030
|
-
/** @internal */
|
2031
|
-
onFocus(): void;
|
2032
|
-
/**
|
2033
|
-
* Function called to get the list of controls that should not steal the focus from this control
|
2034
|
-
* @returns an array of controls
|
2035
|
-
*/
|
2036
|
-
keepsFocusWith(): Nullable<Control[]>;
|
2037
|
-
/**
|
2038
|
-
* Function to focus a button programmatically
|
2039
|
-
*/
|
2040
|
-
focus(): void;
|
2041
|
-
/**
|
2042
|
-
* Function to unfocus a button programmatically
|
2043
|
-
*/
|
2044
|
-
blur(): void;
|
2045
|
-
/**
|
2046
|
-
* Handles the keyboard event
|
2047
|
-
* @param evt Defines the KeyboardEvent
|
2048
|
-
*/
|
2049
|
-
processKeyboard(evt: IKeyboardEvent): void;
|
2050
2072
|
/**
|
2051
2073
|
* @internal
|
2052
2074
|
*/
|
2053
2075
|
_onPointerDown(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number, pi: PointerInfoBase): boolean;
|
2054
|
-
/** @internal */
|
2055
|
-
dispose(): void;
|
2056
2076
|
}
|
2057
2077
|
|
2058
2078
|
}
|
@@ -2090,6 +2110,15 @@ export interface IFocusableControl {
|
|
2090
2110
|
* Function to unfocus the control programmatically
|
2091
2111
|
*/
|
2092
2112
|
blur(): void;
|
2113
|
+
/**
|
2114
|
+
* Gets or sets the tabIndex of the control
|
2115
|
+
*/
|
2116
|
+
tabIndex?: number;
|
2117
|
+
/**
|
2118
|
+
* Gets or sets the color used to draw the focus border
|
2119
|
+
* Defaults to "white"
|
2120
|
+
*/
|
2121
|
+
focusBorderColor?: string;
|
2093
2122
|
}
|
2094
2123
|
|
2095
2124
|
}
|
@@ -2709,7 +2738,6 @@ import { Vector2 } from "babylonjs/Maths/math.vector";
|
|
2709
2738
|
import { ClipboardInfo } from "babylonjs/Events/clipboardEvents";
|
2710
2739
|
import { PointerInfo, PointerInfoBase } from "babylonjs/Events/pointerEvents";
|
2711
2740
|
import { Control } from "babylonjs-gui/2D/controls/control";
|
2712
|
-
import { IFocusableControl } from "babylonjs-gui/2D/controls/focusableControl";
|
2713
2741
|
import { ValueAndUnit } from "babylonjs-gui/2D/valueAndUnit";
|
2714
2742
|
import { VirtualKeyboard } from "babylonjs-gui/2D/controls/virtualKeyboard";
|
2715
2743
|
import { TextWrapper } from "babylonjs-gui/2D/controls/textWrapper";
|
@@ -2718,19 +2746,17 @@ import { ICanvasRenderingContext } from "babylonjs/Engines/ICanvas";
|
|
2718
2746
|
/**
|
2719
2747
|
* Class used to create input text control
|
2720
2748
|
*/
|
2721
|
-
export class InputText extends Control
|
2749
|
+
export class InputText extends Control {
|
2722
2750
|
name?: string | undefined;
|
2723
2751
|
protected _textWrapper: TextWrapper;
|
2724
2752
|
protected _placeholderText: string;
|
2725
2753
|
protected _background: string;
|
2726
2754
|
protected _focusedBackground: string;
|
2727
|
-
protected _focusedColor: string;
|
2728
2755
|
protected _placeholderColor: string;
|
2729
2756
|
protected _thickness: number;
|
2730
2757
|
protected _margin: ValueAndUnit;
|
2731
2758
|
protected _autoStretchWidth: boolean;
|
2732
2759
|
protected _maxWidth: ValueAndUnit;
|
2733
|
-
protected _isFocused: boolean;
|
2734
2760
|
/** the type of device that most recently focused the input: "mouse", "touch" or "pen" */
|
2735
2761
|
protected _focusedBy: string;
|
2736
2762
|
protected _blinkTimeout: number;
|
@@ -2775,10 +2801,6 @@ export class InputText extends Control implements IFocusableControl {
|
|
2775
2801
|
onTextChangedObservable: Observable<InputText>;
|
2776
2802
|
/** Observable raised just before an entered character is to be added */
|
2777
2803
|
onBeforeKeyAddObservable: Observable<InputText>;
|
2778
|
-
/** Observable raised when the control gets the focus */
|
2779
|
-
onFocusObservable: Observable<InputText>;
|
2780
|
-
/** Observable raised when the control loses the focus */
|
2781
|
-
onBlurObservable: Observable<InputText>;
|
2782
2804
|
/** Observable raised when the text is highlighted */
|
2783
2805
|
onTextHighlightObservable: Observable<InputText>;
|
2784
2806
|
/** Observable raised when copy event is triggered */
|
@@ -2787,8 +2809,6 @@ export class InputText extends Control implements IFocusableControl {
|
|
2787
2809
|
onTextCutObservable: Observable<InputText>;
|
2788
2810
|
/** Observable raised when paste event is triggered */
|
2789
2811
|
onTextPasteObservable: Observable<InputText>;
|
2790
|
-
/** Observable raised when a key event was processed */
|
2791
|
-
onKeyboardEventProcessedObservable: Observable<IKeyboardEvent>;
|
2792
2812
|
/** Gets or sets the maximum width allowed by the control */
|
2793
2813
|
get maxWidth(): string | number;
|
2794
2814
|
/** Gets the maximum width allowed by the control in pixels */
|
@@ -2818,7 +2838,6 @@ export class InputText extends Control implements IFocusableControl {
|
|
2818
2838
|
get focusedBackground(): string;
|
2819
2839
|
set focusedBackground(value: string);
|
2820
2840
|
/** Gets or sets the background color when focused */
|
2821
|
-
get focusedColor(): string;
|
2822
2841
|
set focusedColor(value: string);
|
2823
2842
|
/** Gets or sets the background color */
|
2824
2843
|
get background(): string;
|
@@ -2859,14 +2878,6 @@ export class InputText extends Control implements IFocusableControl {
|
|
2859
2878
|
onBlur(): void;
|
2860
2879
|
/** @internal */
|
2861
2880
|
onFocus(): void;
|
2862
|
-
/**
|
2863
|
-
* Function to focus an inputText programmatically
|
2864
|
-
*/
|
2865
|
-
focus(): void;
|
2866
|
-
/**
|
2867
|
-
* Function to unfocus an inputText programmatically
|
2868
|
-
*/
|
2869
|
-
blur(): void;
|
2870
2881
|
protected _getTypeName(): string;
|
2871
2882
|
/**
|
2872
2883
|
* Function called to get the list of controls that should not steal the focus from this control
|
@@ -9031,6 +9042,11 @@ declare module BABYLON.GUI {
|
|
9031
9042
|
* Gets or sets a boolean indicating that the canvas must be reverted on Y when updating the texture
|
9032
9043
|
*/
|
9033
9044
|
applyYInversionOnUpdate: boolean;
|
9045
|
+
/**
|
9046
|
+
* A boolean indicating whether or not the elements can be navigated to using the tab key.
|
9047
|
+
* Defaults to false.
|
9048
|
+
*/
|
9049
|
+
disableTabNavigation: boolean;
|
9034
9050
|
/**
|
9035
9051
|
* Gets or sets a number used to scale rendering size (2 means that the texture will be twice bigger).
|
9036
9052
|
* Useful when you want more antialiasing
|
@@ -9108,8 +9124,8 @@ declare module BABYLON.GUI {
|
|
9108
9124
|
/**
|
9109
9125
|
* Gets or sets the current focused control
|
9110
9126
|
*/
|
9111
|
-
get focusedControl(): BABYLON.Nullable<
|
9112
|
-
set focusedControl(control: BABYLON.Nullable<
|
9127
|
+
get focusedControl(): BABYLON.Nullable<Control>;
|
9128
|
+
set focusedControl(control: BABYLON.Nullable<Control>);
|
9113
9129
|
/**
|
9114
9130
|
* Gets or sets a boolean indicating if the texture must be rendered in background or foreground when in fullscreen mode
|
9115
9131
|
*/
|
@@ -9254,6 +9270,7 @@ declare module BABYLON.GUI {
|
|
9254
9270
|
private _translateToPicking;
|
9255
9271
|
/** Attach to all scene events required to support pointer events */
|
9256
9272
|
attach(): void;
|
9273
|
+
private _focusNextElement;
|
9257
9274
|
/**
|
9258
9275
|
* @internal
|
9259
9276
|
*/
|
@@ -9290,7 +9307,7 @@ declare module BABYLON.GUI {
|
|
9290
9307
|
* Move the focus to a specific control
|
9291
9308
|
* @param control defines the control which will receive the focus
|
9292
9309
|
*/
|
9293
|
-
moveFocusToControl(control:
|
9310
|
+
moveFocusToControl(control: Control): void;
|
9294
9311
|
private _manageFocus;
|
9295
9312
|
private _attachPickingToSceneRender;
|
9296
9313
|
private _attachToOnPointerOut;
|
@@ -9843,7 +9860,7 @@ declare module BABYLON.GUI {
|
|
9843
9860
|
* Root class used for all 2D controls
|
9844
9861
|
* @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#controls
|
9845
9862
|
*/
|
9846
|
-
export class Control implements BABYLON.IAnimatable {
|
9863
|
+
export class Control implements BABYLON.IAnimatable, IFocusableControl {
|
9847
9864
|
/** defines the name of the control */
|
9848
9865
|
name?: string | undefined;
|
9849
9866
|
/**
|
@@ -10065,6 +10082,10 @@ declare module BABYLON.GUI {
|
|
10065
10082
|
* An event triggered when a control is clicked on
|
10066
10083
|
*/
|
10067
10084
|
onPointerClickObservable: BABYLON.Observable<Vector2WithInfo>;
|
10085
|
+
/**
|
10086
|
+
* An event triggered when a control receives an ENTER key down event
|
10087
|
+
*/
|
10088
|
+
onEnterPressedObservable: BABYLON.Observable<Control>;
|
10068
10089
|
/**
|
10069
10090
|
* An event triggered when pointer enters the control
|
10070
10091
|
*/
|
@@ -10385,6 +10406,52 @@ declare module BABYLON.GUI {
|
|
10385
10406
|
* Array of animations
|
10386
10407
|
*/
|
10387
10408
|
animations: BABYLON.Nullable<BABYLON.Animation[]>;
|
10409
|
+
protected _focusedColor: BABYLON.Nullable<string>;
|
10410
|
+
/**
|
10411
|
+
* Border color when control is focused
|
10412
|
+
* When not defined the ADT color will be used. If no ADT color is defined, focused state won't have any border
|
10413
|
+
*/
|
10414
|
+
get focusedColor(): BABYLON.Nullable<string>;
|
10415
|
+
set focusedColor(value: BABYLON.Nullable<string>);
|
10416
|
+
/**
|
10417
|
+
* The tab index of this control. -1 indicates this control is not part of the tab navigation.
|
10418
|
+
* A positive value indicates the order of the control in the tab navigation.
|
10419
|
+
* A value of 0 indicated the control will be focused after all controls with a positive index.
|
10420
|
+
* More than one control can have the same tab index and the navigation would then go through all controls with the same value in an order defined by the layout or the hierarchy.
|
10421
|
+
* The value can be changed at any time.
|
10422
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex
|
10423
|
+
*/
|
10424
|
+
tabIndex: number;
|
10425
|
+
protected _isFocused: boolean;
|
10426
|
+
protected _unfocusedColor: BABYLON.Nullable<string>;
|
10427
|
+
/** BABYLON.Observable raised when the control gets the focus */
|
10428
|
+
onFocusObservable: BABYLON.Observable<Control>;
|
10429
|
+
/** BABYLON.Observable raised when the control loses the focus */
|
10430
|
+
onBlurObservable: BABYLON.Observable<Control>;
|
10431
|
+
/** BABYLON.Observable raised when a key event was processed */
|
10432
|
+
onKeyboardEventProcessedObservable: BABYLON.Observable<BABYLON.IKeyboardEvent>;
|
10433
|
+
/** @internal */
|
10434
|
+
onBlur(): void;
|
10435
|
+
/** @internal */
|
10436
|
+
onFocus(): void;
|
10437
|
+
/**
|
10438
|
+
* Function called to get the list of controls that should not steal the focus from this control
|
10439
|
+
* @returns an array of controls
|
10440
|
+
*/
|
10441
|
+
keepsFocusWith(): BABYLON.Nullable<Control[]>;
|
10442
|
+
/**
|
10443
|
+
* Function to focus a button programmatically
|
10444
|
+
*/
|
10445
|
+
focus(): void;
|
10446
|
+
/**
|
10447
|
+
* Function to unfocus a button programmatically
|
10448
|
+
*/
|
10449
|
+
blur(): void;
|
10450
|
+
/**
|
10451
|
+
* Handles the keyboard event
|
10452
|
+
* @param evt Defines the KeyboardEvent
|
10453
|
+
*/
|
10454
|
+
processKeyboard(evt: BABYLON.IKeyboardEvent): void;
|
10388
10455
|
/**
|
10389
10456
|
* Creates a new control
|
10390
10457
|
* @param name defines the name of the control
|
@@ -10796,45 +10863,11 @@ declare module BABYLON.GUI {
|
|
10796
10863
|
*/
|
10797
10864
|
export class FocusableButton extends Button implements IFocusableControl {
|
10798
10865
|
name?: string | undefined;
|
10799
|
-
/** Highlight color when button is focused */
|
10800
|
-
focusedColor: BABYLON.Nullable<string>;
|
10801
|
-
private _isFocused;
|
10802
|
-
private _unfocusedColor;
|
10803
|
-
/** BABYLON.Observable raised when the control gets the focus */
|
10804
|
-
onFocusObservable: BABYLON.Observable<Button>;
|
10805
|
-
/** BABYLON.Observable raised when the control loses the focus */
|
10806
|
-
onBlurObservable: BABYLON.Observable<Button>;
|
10807
|
-
/** BABYLON.Observable raised when a key event was processed */
|
10808
|
-
onKeyboardEventProcessedObservable: BABYLON.Observable<BABYLON.IKeyboardEvent>;
|
10809
10866
|
constructor(name?: string | undefined);
|
10810
|
-
/** @internal */
|
10811
|
-
onBlur(): void;
|
10812
|
-
/** @internal */
|
10813
|
-
onFocus(): void;
|
10814
|
-
/**
|
10815
|
-
* Function called to get the list of controls that should not steal the focus from this control
|
10816
|
-
* @returns an array of controls
|
10817
|
-
*/
|
10818
|
-
keepsFocusWith(): BABYLON.Nullable<Control[]>;
|
10819
|
-
/**
|
10820
|
-
* Function to focus a button programmatically
|
10821
|
-
*/
|
10822
|
-
focus(): void;
|
10823
|
-
/**
|
10824
|
-
* Function to unfocus a button programmatically
|
10825
|
-
*/
|
10826
|
-
blur(): void;
|
10827
|
-
/**
|
10828
|
-
* Handles the keyboard event
|
10829
|
-
* @param evt Defines the KeyboardEvent
|
10830
|
-
*/
|
10831
|
-
processKeyboard(evt: BABYLON.IKeyboardEvent): void;
|
10832
10867
|
/**
|
10833
10868
|
* @internal
|
10834
10869
|
*/
|
10835
10870
|
_onPointerDown(target: Control, coordinates: BABYLON.Vector2, pointerId: number, buttonIndex: number, pi: BABYLON.PointerInfoBase): boolean;
|
10836
|
-
/** @internal */
|
10837
|
-
dispose(): void;
|
10838
10871
|
}
|
10839
10872
|
|
10840
10873
|
|
@@ -10868,6 +10901,15 @@ declare module BABYLON.GUI {
|
|
10868
10901
|
* Function to unfocus the control programmatically
|
10869
10902
|
*/
|
10870
10903
|
blur(): void;
|
10904
|
+
/**
|
10905
|
+
* Gets or sets the tabIndex of the control
|
10906
|
+
*/
|
10907
|
+
tabIndex?: number;
|
10908
|
+
/**
|
10909
|
+
* Gets or sets the color used to draw the focus border
|
10910
|
+
* Defaults to "white"
|
10911
|
+
*/
|
10912
|
+
focusBorderColor?: string;
|
10871
10913
|
}
|
10872
10914
|
|
10873
10915
|
|
@@ -11422,19 +11464,17 @@ declare module BABYLON.GUI {
|
|
11422
11464
|
/**
|
11423
11465
|
* Class used to create input text control
|
11424
11466
|
*/
|
11425
|
-
export class InputText extends Control
|
11467
|
+
export class InputText extends Control {
|
11426
11468
|
name?: string | undefined;
|
11427
11469
|
protected _textWrapper: TextWrapper;
|
11428
11470
|
protected _placeholderText: string;
|
11429
11471
|
protected _background: string;
|
11430
11472
|
protected _focusedBackground: string;
|
11431
|
-
protected _focusedColor: string;
|
11432
11473
|
protected _placeholderColor: string;
|
11433
11474
|
protected _thickness: number;
|
11434
11475
|
protected _margin: ValueAndUnit;
|
11435
11476
|
protected _autoStretchWidth: boolean;
|
11436
11477
|
protected _maxWidth: ValueAndUnit;
|
11437
|
-
protected _isFocused: boolean;
|
11438
11478
|
/** the type of device that most recently focused the input: "mouse", "touch" or "pen" */
|
11439
11479
|
protected _focusedBy: string;
|
11440
11480
|
protected _blinkTimeout: number;
|
@@ -11479,10 +11519,6 @@ declare module BABYLON.GUI {
|
|
11479
11519
|
onTextChangedObservable: BABYLON.Observable<InputText>;
|
11480
11520
|
/** BABYLON.Observable raised just before an entered character is to be added */
|
11481
11521
|
onBeforeKeyAddObservable: BABYLON.Observable<InputText>;
|
11482
|
-
/** BABYLON.Observable raised when the control gets the focus */
|
11483
|
-
onFocusObservable: BABYLON.Observable<InputText>;
|
11484
|
-
/** BABYLON.Observable raised when the control loses the focus */
|
11485
|
-
onBlurObservable: BABYLON.Observable<InputText>;
|
11486
11522
|
/** BABYLON.Observable raised when the text is highlighted */
|
11487
11523
|
onTextHighlightObservable: BABYLON.Observable<InputText>;
|
11488
11524
|
/** BABYLON.Observable raised when copy event is triggered */
|
@@ -11491,8 +11527,6 @@ declare module BABYLON.GUI {
|
|
11491
11527
|
onTextCutObservable: BABYLON.Observable<InputText>;
|
11492
11528
|
/** BABYLON.Observable raised when paste event is triggered */
|
11493
11529
|
onTextPasteObservable: BABYLON.Observable<InputText>;
|
11494
|
-
/** BABYLON.Observable raised when a key event was processed */
|
11495
|
-
onKeyboardEventProcessedObservable: BABYLON.Observable<BABYLON.IKeyboardEvent>;
|
11496
11530
|
/** Gets or sets the maximum width allowed by the control */
|
11497
11531
|
get maxWidth(): string | number;
|
11498
11532
|
/** Gets the maximum width allowed by the control in pixels */
|
@@ -11522,7 +11556,6 @@ declare module BABYLON.GUI {
|
|
11522
11556
|
get focusedBackground(): string;
|
11523
11557
|
set focusedBackground(value: string);
|
11524
11558
|
/** Gets or sets the background color when focused */
|
11525
|
-
get focusedColor(): string;
|
11526
11559
|
set focusedColor(value: string);
|
11527
11560
|
/** Gets or sets the background color */
|
11528
11561
|
get background(): string;
|
@@ -11563,14 +11596,6 @@ declare module BABYLON.GUI {
|
|
11563
11596
|
onBlur(): void;
|
11564
11597
|
/** @internal */
|
11565
11598
|
onFocus(): void;
|
11566
|
-
/**
|
11567
|
-
* Function to focus an inputText programmatically
|
11568
|
-
*/
|
11569
|
-
focus(): void;
|
11570
|
-
/**
|
11571
|
-
* Function to unfocus an inputText programmatically
|
11572
|
-
*/
|
11573
|
-
blur(): void;
|
11574
11599
|
protected _getTypeName(): string;
|
11575
11600
|
/**
|
11576
11601
|
* Function called to get the list of controls that should not steal the focus from this control
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "babylonjs-gui",
|
3
|
-
"version": "7.
|
3
|
+
"version": "7.13.1",
|
4
4
|
"main": "babylon.gui.js",
|
5
5
|
"types": "babylon.gui.module.d.ts",
|
6
6
|
"files": [
|
@@ -15,7 +15,7 @@
|
|
15
15
|
"test:escheck": "es-check es6 ./babylon.gui.js"
|
16
16
|
},
|
17
17
|
"dependencies": {
|
18
|
-
"babylonjs": "^7.
|
18
|
+
"babylonjs": "^7.13.1"
|
19
19
|
},
|
20
20
|
"devDependencies": {
|
21
21
|
"@dev/build-tools": "1.0.0",
|