Browse Source

Open renderingGroupId on holographic button

sebavan 5 years ago
parent
commit
e18881e24f
1 changed files with 16 additions and 0 deletions
  1. 16 0
      gui/src/3D/controls/holographicButton.ts

+ 16 - 0
gui/src/3D/controls/holographicButton.ts

@@ -57,6 +57,22 @@ export class HolographicButton extends Button3D {
     }
 
     /**
+     * Rendering ground id of all the mesh in the button
+     */
+    public set renderingGroupId(id: number) {
+        this._backPlate.renderingGroupId = id;
+        this._textPlate.renderingGroupId = id;
+        this._frontPlate.renderingGroupId = id;
+
+        if (this._tooltipMesh) {
+            this._tooltipMesh.renderingGroupId = id;
+        }
+    }
+    public get renderingGroupId(): number {
+        return this._backPlate.renderingGroupId;
+    }
+
+    /**
      * Text to be displayed on the tooltip shown when hovering on the button. When set to null tooltip is disabled. (Default: null)
      */
     public set tooltipText(text: Nullable<string>) {