forked from EpicGamesExt/PixelStreamingInfrastructure
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTextOverlay.ts
32 lines (29 loc) · 918 Bytes
/
TextOverlay.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright Epic Games, Inc. All Rights Reserved.
import { OverlayBase } from './BaseOverlay';
/**
* Class for the text overlay base
*/
export class TextOverlay extends OverlayBase {
/**
* Construct a text overlay
* @param rootDiv the root element this overlay will be inserted into
* @param rootElement the root element that is the overlay
* @param textElement an element that contains text for the action overlay
*/
public constructor(
rootDiv: HTMLElement,
rootElement: HTMLElement,
textElement: HTMLElement
) {
super(rootDiv, rootElement, textElement);
}
/**
* Update the text overlays inner text
* @param text the update text to be inserted into the overlay
*/
public update(text: string): void {
if (text != null || text != undefined) {
this.textElement.innerHTML = text;
}
}
}