1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00

Added new setting allowing for middle mouse scrolling.

This commit is contained in:
Moppler 2020-07-18 23:58:38 +01:00
parent 2463a7236b
commit 27e282b354
3 changed files with 12 additions and 1 deletions

View File

@ -437,8 +437,12 @@ export class Camera extends BasicSerializableObject {
return;
}
const middleMousePressed = event.button === 1 && event.buttons === 4;
this.touchPostMoveVelocity = new Vector(0, 0);
if (event.button === 0) {
if (
event.button === 0 ||
(middleMousePressed && this.root.app.settings.getSetting("middleMouseScroll"))
) {
this.combinedSingleTouchStartHandler(event.clientX, event.clientY);
} else if (event.button === 1) {
this.downPreHandler.dispatch(new Vector(event.clientX, event.clientY), enumMouseButton.middle);

View File

@ -252,6 +252,7 @@ export const allApplicationSettings = [
new BoolSetting("compactBuildingInfo", categoryGame, (app, value) => {}),
new BoolSetting("disableCutDeleteWarnings", categoryGame, (app, value) => {}),
new BoolSetting("rotationByBuilding", categoryGame, (app, value) => {}),
new BoolSetting("middleMouseScroll", categoryGame, (app, value) => {}),
];
export function getApplicationSettingById(id) {
@ -279,6 +280,7 @@ class SettingsStorage {
this.compactBuildingInfo = false;
this.disableCutDeleteWarnings = false;
this.rotationByBuilding = true;
this.middleMouseScroll = false;
this.enableColorBlindHelper = false;

View File

@ -774,6 +774,11 @@ settings:
description: >-
Disables the warning dialogs brought up when cutting/deleting more than 100 entities.
middleMouseScroll:
title: Middle mouse scroll
description: >-
Allows for scrolling with the middle mouse button in addition to left click.
keybindings:
title: Keybindings
hint: >-