fix emotemenu on open jitsi rooms

This commit is contained in:
Lurkars 2021-09-13 19:16:47 +02:00
parent 59c22c8dfc
commit beed50874b
3 changed files with 7 additions and 1 deletions

View File

@ -1,6 +1,7 @@
<script lang="typescript">
import MenuIcon from "./Menu/MenuIcon.svelte";
import {menuIconVisiblilityStore, menuVisiblilityStore} from "../Stores/MenuStore";
import {emoteMenuVisiblilityStore} from "../Stores/EmoteStore";
import {enableCameraSceneVisibilityStore} from "../Stores/MediaStore";
import CameraControls from "./CameraControls.svelte";
import MyCamera from "./MyCamera.svelte";
@ -112,7 +113,7 @@
<Menu></Menu>
</div>
{/if}
{#if $gameOverlayVisibilityStore}
{#if $emoteMenuVisiblilityStore}
<div>
<EmoteMenu></EmoteMenu>
</div>

View File

@ -9,6 +9,7 @@ import { get } from "svelte/store";
import { requestedCameraState, requestedMicrophoneState } from "../../Stores/MediaStore";
import { helpCameraSettingsVisibleStore } from "../../Stores/HelpCameraSettingsStore";
import { menuIconVisiblilityStore } from "../../Stores/MenuStore";
import { emoteMenuVisiblilityStore } from "../../Stores/EmoteStore";
/**
* This class should be responsible for any scene starting/stopping
@ -111,6 +112,7 @@ export class GameManager {
public gameSceneIsCreated(scene: GameScene) {
this.currentGameSceneName = scene.scene.key;
menuIconVisiblilityStore.set(true);
emoteMenuVisiblilityStore.set(true);
}
/**
@ -123,6 +125,7 @@ export class GameManager {
gameScene.cleanupClosingScene();
gameScene.createSuccessorGameScene(false, false);
menuIconVisiblilityStore.set(false);
emoteMenuVisiblilityStore.set(false);
if (!this.scenePlugin.get(targetSceneName)) {
this.scenePlugin.add(targetSceneName, sceneClass, false);
}
@ -136,6 +139,7 @@ export class GameManager {
if (this.currentGameSceneName) {
this.scenePlugin.start(this.currentGameSceneName);
menuIconVisiblilityStore.set(true);
emoteMenuVisiblilityStore.set(true);
} else {
this.scenePlugin.run(fallbackSceneName);
}

View File

@ -14,5 +14,6 @@ function createEmoteMenuStore() {
};
}
export const emoteMenuVisiblilityStore = writable(false);
export const emoteStore = writable<string | null>(null);
export const emoteMenuStore = createEmoteMenuStore();