Fix to use clear All Keys

This commit is contained in:
Gregoire Parant 2021-02-11 21:48:24 +01:00
parent 64cd07cc39
commit b92b7304b0
5 changed files with 9 additions and 5 deletions

View File

@ -332,7 +332,7 @@ export class ConsoleGlobalMessageManager {
}
active(){
this.userInputManager.clearAllInputKeyboard();
this.userInputManager.clearAllKeys();
this.divMainConsole.style.top = '0';
this.activeConsole = true;
}

View File

@ -1263,7 +1263,7 @@ export class GameScene extends ResizableScene implements CenterListener {
private bannedUser(){
this.cleanupClosingScene();
this.userInputManager.clearAllInputKeyboard();
this.userInputManager.clearAllKeys();
this.scene.start(ErrorSceneName, {
title: 'Banned',
subTitle: 'You was banned of WorkAdventure',

View File

@ -269,7 +269,7 @@ export class MenuScene extends Phaser.Scene {
middleX = 0;
}
gameManager.getCurrentGameScene(this).userInputManager.clearAllInputKeyboard();
gameManager.getCurrentGameScene(this).userInputManager.clearAllKeys();
this.tweens.add({
targets: this.gameReportElement,

View File

@ -59,10 +59,14 @@ export class UserInputManager {
];
}
clearAllInputKeyboard(){
clearAllListeners(){
this.Scene.input.keyboard.removeAllListeners();
}
clearAllKeys(){
this.Scene.input.keyboard.removeAllKeys();
}
getEventListForGameTick(): ActiveEventList {
const eventsMap = new ActiveEventList();
this.KeysCode.forEach(d => {

View File

@ -61,7 +61,7 @@ export class DiscussionManager {
const inputMessage: HTMLInputElement = document.createElement('input');
inputMessage.onfocus = () => {
if(this.userInputManager) {
this.userInputManager.clearAllInputKeyboard();
this.userInputManager.clearAllKeys();
}
}
inputMessage.onblur = () => {