@onerjs/gui 8.35.7 → 8.35.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -105,6 +105,9 @@ export declare class Control implements IAnimatable, IFocusableControl {
105
105
  private _isHighlighted;
106
106
  private _highlightColor;
107
107
  protected _highlightLineWidth: number;
108
+ private _isInternalHighlighted;
109
+ private _internalHighlightColor;
110
+ private _internalHighlightLineWidth;
108
111
  /** @internal */
109
112
  _linkedMesh: Nullable<TransformNode>;
110
113
  private _fontSet;
@@ -338,6 +341,24 @@ export declare class Control implements IAnimatable, IFocusableControl {
338
341
  */
339
342
  get highlightColor(): string;
340
343
  set highlightColor(value: string);
344
+ /**
345
+ * @internal
346
+ * @param value
347
+ */
348
+ set isInternalHighlighted(value: boolean);
349
+ get isInternalHighlighted(): boolean;
350
+ /**
351
+ * @internal
352
+ * @param value
353
+ */
354
+ set internalHighlightColor(value: string);
355
+ get internalHighlightColor(): string;
356
+ /**
357
+ * @internal
358
+ * @param value
359
+ */
360
+ set internalHighlightLineWidth(value: number);
361
+ get internalHighlightLineWidth(): number;
341
362
  /** Gets or sets a value indicating the scale factor on X axis (1 by default)
342
363
  * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#rotation-and-scaling
343
364
  */
@@ -208,6 +208,48 @@ export class Control {
208
208
  this._highlightColor = value;
209
209
  this._markAsDirty();
210
210
  }
211
+ /**
212
+ * @internal
213
+ * @param value
214
+ */
215
+ set isInternalHighlighted(value) {
216
+ if (this._isInternalHighlighted === value) {
217
+ return;
218
+ }
219
+ this._isInternalHighlighted = value;
220
+ this.markAsDirty();
221
+ }
222
+ get isInternalHighlighted() {
223
+ return this._isInternalHighlighted;
224
+ }
225
+ /**
226
+ * @internal
227
+ * @param value
228
+ */
229
+ set internalHighlightColor(value) {
230
+ if (this._internalHighlightColor === value) {
231
+ return;
232
+ }
233
+ this._internalHighlightColor = value;
234
+ this._markAsDirty();
235
+ }
236
+ get internalHighlightColor() {
237
+ return this._internalHighlightColor;
238
+ }
239
+ /**
240
+ * @internal
241
+ * @param value
242
+ */
243
+ set internalHighlightLineWidth(value) {
244
+ if (this._internalHighlightLineWidth === value) {
245
+ return;
246
+ }
247
+ this._internalHighlightLineWidth = value;
248
+ this.markAsDirty();
249
+ }
250
+ get internalHighlightLineWidth() {
251
+ return this._internalHighlightLineWidth;
252
+ }
211
253
  /** Gets or sets a value indicating the scale factor on X axis (1 by default)
212
254
  * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#rotation-and-scaling
213
255
  */
@@ -1004,6 +1046,9 @@ export class Control {
1004
1046
  this._isHighlighted = false;
1005
1047
  this._highlightColor = "#4affff";
1006
1048
  this._highlightLineWidth = 2;
1049
+ this._isInternalHighlighted = false;
1050
+ this._internalHighlightColor = "#4affff";
1051
+ this._internalHighlightLineWidth = 2;
1007
1052
  this._fontSet = false;
1008
1053
  this._dummyVector2 = Vector2.Zero();
1009
1054
  this._downCount = 0;
@@ -1529,12 +1574,12 @@ export class Control {
1529
1574
  * @internal
1530
1575
  */
1531
1576
  _renderHighlight(context) {
1532
- if (!this.isHighlighted) {
1577
+ if (!this.isHighlighted && !this.isInternalHighlighted) {
1533
1578
  return;
1534
1579
  }
1535
1580
  context.save();
1536
- context.strokeStyle = this._highlightColor;
1537
- context.lineWidth = this._highlightLineWidth;
1581
+ context.strokeStyle = this.isInternalHighlighted ? this._internalHighlightColor : this._highlightColor;
1582
+ context.lineWidth = this.isInternalHighlighted ? this._internalHighlightLineWidth : this._highlightLineWidth;
1538
1583
  this._renderHighlightSpecific(context);
1539
1584
  context.restore();
1540
1585
  }