This repository was archived by the owner on Apr 29, 2024. It is now read-only.
forked from EpicGames/PixelStreamingInfrastructure
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInfoOverlay.ts
More file actions
39 lines (35 loc) · 1.25 KB
/
InfoOverlay.ts
File metadata and controls
39 lines (35 loc) · 1.25 KB
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
33
34
35
36
37
38
39
// Copyright Epic Games, Inc. All Rights Reserved.
import { TextOverlay } from './TextOverlay';
/**
* Generic overlay used to show textual info to the user.
*/
export class InfoOverlay extends TextOverlay {
/**
* @returns The created root element of this overlay.
*/
public static createRootElement(): HTMLElement {
const infoOverlayHtml = document.createElement('div');
infoOverlayHtml.id = 'infoOverlay';
infoOverlayHtml.className = 'textDisplayState';
return infoOverlayHtml;
}
/**
* @returns The created content element of this overlay, which contain whatever content this element contains, like text or a button.
*/
public static createContentElement(): HTMLElement {
const infoOverlayHtmlInner = document.createElement('div');
infoOverlayHtmlInner.id = 'messageOverlayInner';
return infoOverlayHtmlInner;
}
/**
* Construct a connect overlay with a connection button.
* @param parentElem the parent element this overlay will be inserted into.
*/
public constructor(parentElem: HTMLElement) {
super(
parentElem,
InfoOverlay.createRootElement(),
InfoOverlay.createContentElement()
);
}
}