From bede7abdd8f9c433c9b4d33cf9afe222b9329899 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Wed, 5 May 2021 12:15:13 +0200 Subject: [PATCH] Removing mousewheel to up down plugin --- front/src/Phaser/Game/GameScene.ts | 4 ---- front/src/Phaser/Login/EnableCameraScene.ts | 5 +---- front/src/Phaser/UserInput/UserInputManager.ts | 2 -- front/src/rex-plugins.d.ts | 8 ++------ 4 files changed, 3 insertions(+), 16 deletions(-) diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts index 15e81bef..2d663fb7 100644 --- a/front/src/Phaser/Game/GameScene.ts +++ b/front/src/Phaser/Game/GameScene.ts @@ -60,7 +60,6 @@ import {connectionManager} from "../../Connexion/ConnectionManager"; import {RoomConnection} from "../../Connexion/RoomConnection"; import {GlobalMessageManager} from "../../Administration/GlobalMessageManager"; import {userMessageManager} from "../../Administration/UserMessageManager"; -import MouseWheelToUpDown from 'phaser3-rex-plugins/plugins/mousewheeltoupdown.js'; import {ConsoleGlobalMessageManager} from "../../Administration/ConsoleGlobalMessageManager"; import {ResizableScene} from "../Login/ResizableScene"; import {Room} from "../../Connexion/Room"; @@ -185,7 +184,6 @@ export class GameScene extends ResizableScene implements CenterListener { private messageSubscription: Subscription|null = null; private popUpElements : Map = new Map(); private originalMapUrl: string|undefined; - private cursorKeys: any; private pinchManager: PinchManager|undefined; constructor(private room: Room, MapUrlFile: string, customKey?: string|undefined) { @@ -370,8 +368,6 @@ export class GameScene extends ResizableScene implements CenterListener { //hook create scene create(): void { - const mouseWheelToUpDown = new MouseWheelToUpDown(this); - this.cursorKeys = mouseWheelToUpDown.createCursorKeys(); gameManager.gameSceneIsCreated(this); urlManager.pushRoomIdToUrl(this.room); this.startLayerName = urlManager.getStartLayerNameFromUrl(); diff --git a/front/src/Phaser/Login/EnableCameraScene.ts b/front/src/Phaser/Login/EnableCameraScene.ts index fe4984d7..5d5bfa4f 100644 --- a/front/src/Phaser/Login/EnableCameraScene.ts +++ b/front/src/Phaser/Login/EnableCameraScene.ts @@ -9,7 +9,6 @@ import {SoundMeterSprite} from "../Components/SoundMeterSprite"; import {HtmlUtils} from "../../WebRtc/HtmlUtils"; import {touchScreenManager} from "../../Touch/TouchScreenManager"; import {PinchManager} from "../UserInput/PinchManager"; -import MouseWheelToUpDown from "phaser3-rex-plugins/plugins/mousewheeltoupdown.js"; import Zone = Phaser.GameObjects.Zone; import { MenuScene } from "../Menu/MenuScene"; @@ -43,7 +42,7 @@ export class EnableCameraScene extends Phaser.Scene { private enableCameraSceneElement!: Phaser.GameObjects.DOMElement; private mobileTapZone!: Zone; - private cursorKeys!: any; + constructor() { super({ key: EnableCameraSceneName @@ -79,8 +78,6 @@ export class EnableCameraScene extends Phaser.Scene { } //this.scale.setZoom(ZOOM_LEVEL); //Phaser.Display.Align.In.BottomCenter(this.pressReturnField, zone); - const mouseWheelToUpDown = new MouseWheelToUpDown(this); - this.cursorKeys = mouseWheelToUpDown.createCursorKeys(); /* FIX ME */ this.textField = new TextField(this, this.scale.width / 2, 20, ''); diff --git a/front/src/Phaser/UserInput/UserInputManager.ts b/front/src/Phaser/UserInput/UserInputManager.ts index c569fdd2..fe78dac8 100644 --- a/front/src/Phaser/UserInput/UserInputManager.ts +++ b/front/src/Phaser/UserInput/UserInputManager.ts @@ -2,8 +2,6 @@ import { Direction } from "../../types"; import {GameScene} from "../Game/GameScene"; import {touchScreenManager} from "../../Touch/TouchScreenManager"; import {MobileJoystick} from "../Components/MobileJoystick"; -import MouseWheelToUpDown from 'phaser3-rex-plugins/plugins/mousewheeltoupdown.js'; -import {waScaleManager} from "../Services/WaScaleManager"; interface UserInputManagerDatum { keyInstance: Phaser.Input.Keyboard.Key; diff --git a/front/src/rex-plugins.d.ts b/front/src/rex-plugins.d.ts index 3cb77d91..d5457702 100644 --- a/front/src/rex-plugins.d.ts +++ b/front/src/rex-plugins.d.ts @@ -3,14 +3,10 @@ declare module 'phaser3-rex-plugins/plugins/virtualjoystick.js' { const content: any; // eslint-disable-line export default content; } -declare module 'phaser3-rex-plugins/plugins/mousewheeltoupdown.js' { - const content: any; // eslint-disable-line - export default content; -} declare module 'phaser3-rex-plugins/plugins/gestures-plugin.js' { - const content: any; // eslint-disable-line + const content: any; // eslint-disable-line export default content; } declare module 'phaser3-rex-plugins/plugins/gestures.js' { export const Pinch: any; // eslint-disable-line -} \ No newline at end of file +}