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:
parent
2463a7236b
commit
27e282b354
@ -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);
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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: >-
|
||||
|
Loading…
Reference in New Issue
Block a user