|
@@ -23,6 +23,7 @@
|
23
|
23
|
import { Viewport } from './viewport';
|
24
|
24
|
import { StatsPanel } from '../ui/stats-panel';
|
25
|
25
|
import { FullscreenButton } from '../ui/fullscreen-button';
|
|
26
|
+import { Watermark } from '../ui/watermark';
|
26
|
27
|
import { Nullable, Utils } from '../utils/utils';
|
27
|
28
|
|
28
|
29
|
/** HUD container */
|
|
@@ -48,6 +49,9 @@ export class HUD
|
48
|
49
|
/** Fullscreen button */
|
49
|
50
|
#fullscreenButton: FullscreenButton;
|
50
|
51
|
|
|
52
|
+ /** Watermark */
|
|
53
|
+ #watermark: Watermark;
|
|
54
|
+
|
51
|
55
|
|
52
|
56
|
|
53
|
57
|
|
|
@@ -81,6 +85,7 @@ export class HUD
|
81
|
85
|
// create internal components
|
82
|
86
|
this.#statsPanel = new StatsPanel();
|
83
|
87
|
this.#fullscreenButton = new FullscreenButton(viewport);
|
|
88
|
+ this.#watermark = new Watermark();
|
84
|
89
|
}
|
85
|
90
|
|
86
|
91
|
/**
|
|
@@ -130,6 +135,7 @@ export class HUD
|
130
|
135
|
const parent = this._internalContainer;
|
131
|
136
|
this.#statsPanel.init(parent, wantStatsPanel);
|
132
|
137
|
this.#fullscreenButton.init(parent, wantFullscreenButton);
|
|
138
|
+ this.#watermark.init(parent);
|
133
|
139
|
|
134
|
140
|
for(const element of parent.children as any as HTMLElement[]) {
|
135
|
141
|
if(element.style.getPropertyValue('pointer-events') == '')
|
|
@@ -157,6 +163,7 @@ export class HUD
|
157
|
163
|
{
|
158
|
164
|
this._visible = false;
|
159
|
165
|
|
|
166
|
+ this.#watermark.release();
|
160
|
167
|
this.#fullscreenButton.release();
|
161
|
168
|
this.#statsPanel.release();
|
162
|
169
|
|