diff --git a/front/src/Components/EmoteMenu/EmoteMenu.svelte b/front/src/Components/EmoteMenu/EmoteMenu.svelte index 1a973c1f..cf36c150 100644 --- a/front/src/Components/EmoteMenu/EmoteMenu.svelte +++ b/front/src/Components/EmoteMenu/EmoteMenu.svelte @@ -17,7 +17,7 @@ styleProperties: { '--font': 'Press Start 2P' }, - showSearch : false + autoFocusSearch : false }); picker.on("emoji", (selection) => { diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts index 080576c0..2896b884 100644 --- a/front/src/Phaser/Game/GameScene.ts +++ b/front/src/Phaser/Game/GameScene.ts @@ -173,6 +173,7 @@ export class GameScene extends DirtyScene { private peerStoreUnsubscribe!: () => void; private chatVisibilityUnsubscribe!: () => void; private emoteUnsubscribe!: () => void; + private emoteMenuUnsubscribe!: () => void; private biggestAvailableAreaStoreUnsubscribe!: () => void; MapUrlFile: string; roomUrl: string; @@ -624,6 +625,14 @@ export class GameScene extends DirtyScene { } }); + this.emoteMenuUnsubscribe = emoteMenuStore.subscribe((emoteMenu) => { + if (emoteMenu) { + this.userInputManager.disableControls(); + } else { + this.userInputManager.restoreControls(); + } + }); + Promise.all([this.connectionAnswerPromise as Promise, ...scriptPromises]).then(() => { this.scene.wake(); }); @@ -1313,6 +1322,7 @@ ${escapedMessage} this.peerStoreUnsubscribe(); this.chatVisibilityUnsubscribe(); this.emoteUnsubscribe(); + this.emoteMenuUnsubscribe(); this.biggestAvailableAreaStoreUnsubscribe(); iframeListener.unregisterAnswerer("getState"); iframeListener.unregisterAnswerer("loadTileset");