disable controls
This commit is contained in:
parent
beed50874b
commit
91bc524e06
@ -17,7 +17,7 @@
|
|||||||
styleProperties: {
|
styleProperties: {
|
||||||
'--font': 'Press Start 2P'
|
'--font': 'Press Start 2P'
|
||||||
},
|
},
|
||||||
showSearch : false
|
autoFocusSearch : false
|
||||||
});
|
});
|
||||||
|
|
||||||
picker.on("emoji", (selection) => {
|
picker.on("emoji", (selection) => {
|
||||||
|
@ -173,6 +173,7 @@ export class GameScene extends DirtyScene {
|
|||||||
private peerStoreUnsubscribe!: () => void;
|
private peerStoreUnsubscribe!: () => void;
|
||||||
private chatVisibilityUnsubscribe!: () => void;
|
private chatVisibilityUnsubscribe!: () => void;
|
||||||
private emoteUnsubscribe!: () => void;
|
private emoteUnsubscribe!: () => void;
|
||||||
|
private emoteMenuUnsubscribe!: () => void;
|
||||||
private biggestAvailableAreaStoreUnsubscribe!: () => void;
|
private biggestAvailableAreaStoreUnsubscribe!: () => void;
|
||||||
MapUrlFile: string;
|
MapUrlFile: string;
|
||||||
roomUrl: 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<unknown>, ...scriptPromises]).then(() => {
|
Promise.all([this.connectionAnswerPromise as Promise<unknown>, ...scriptPromises]).then(() => {
|
||||||
this.scene.wake();
|
this.scene.wake();
|
||||||
});
|
});
|
||||||
@ -1313,6 +1322,7 @@ ${escapedMessage}
|
|||||||
this.peerStoreUnsubscribe();
|
this.peerStoreUnsubscribe();
|
||||||
this.chatVisibilityUnsubscribe();
|
this.chatVisibilityUnsubscribe();
|
||||||
this.emoteUnsubscribe();
|
this.emoteUnsubscribe();
|
||||||
|
this.emoteMenuUnsubscribe();
|
||||||
this.biggestAvailableAreaStoreUnsubscribe();
|
this.biggestAvailableAreaStoreUnsubscribe();
|
||||||
iframeListener.unregisterAnswerer("getState");
|
iframeListener.unregisterAnswerer("getState");
|
||||||
iframeListener.unregisterAnswerer("loadTileset");
|
iframeListener.unregisterAnswerer("loadTileset");
|
||||||
|
Loading…
Reference in New Issue
Block a user