Enabling back the open report feature
This commit is contained in:
@@ -11,6 +11,7 @@ import {WarningContainer, warningContainerHtml, warningContainerKey} from "../Co
|
||||
import {worldFullWarningStream} from "../../Connexion/WorldFullWarningStream";
|
||||
import {menuIconVisible} from "../../Stores/MenuStore";
|
||||
import {videoConstraintStore} from "../../Stores/MediaStore";
|
||||
import {showReportScreenStore} from "../../Stores/ShowReportScreenStore";
|
||||
|
||||
export const MenuSceneName = 'MenuScene';
|
||||
const gameMenuKey = 'gameMenu';
|
||||
@@ -82,6 +83,12 @@ export class MenuScene extends Phaser.Scene {
|
||||
this.closeAll();
|
||||
this.gameReportElement.open(parseInt(userId), userName);
|
||||
});
|
||||
showReportScreenStore.subscribe((user) => {
|
||||
this.closeAll();
|
||||
if (user !== null) {
|
||||
this.gameReportElement.open(user.userId, user.userName);
|
||||
}
|
||||
});
|
||||
|
||||
this.input.keyboard.on('keyup-TAB', () => {
|
||||
this.sideMenuOpened ? this.closeSideMenu() : this.openSideMenu();
|
||||
@@ -98,6 +105,10 @@ export class MenuScene extends Phaser.Scene {
|
||||
worldFullWarningStream.stream.subscribe(() => this.showWorldCapacityWarning());
|
||||
}
|
||||
|
||||
public openReport(userId: number, userName: string): void {
|
||||
this.gameReportElement.open(userId, userName);
|
||||
}
|
||||
|
||||
//todo put this method in a parent menuElement class
|
||||
static revealMenusAfterInit(menuElement: Phaser.GameObjects.DOMElement, rootDomId: string) {
|
||||
//Dom elements will appear inside the viewer screen when creating before being moved out of it, which create a flicker effect.
|
||||
|
||||
Reference in New Issue
Block a user