1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-03-02 03:39:21 +00:00

Allow to pan the map with the mouse by moving the cursor to the edges of the screen

This commit is contained in:
tobspr
2020-09-19 20:30:35 +02:00
parent d6f56da9e4
commit fbff0a0ad4
5 changed files with 484 additions and 412 deletions

View File

@@ -253,6 +253,7 @@ export const allApplicationSettings = [
changeCb: (app, id) => {},
}),
new BoolSetting("enableMousePan", enumCategories.advanced, (app, value) => {}),
new BoolSetting("alwaysMultiplace", enumCategories.advanced, (app, value) => {}),
new BoolSetting("clearCursorOnDeleteWhilePlacing", enumCategories.advanced, (app, value) => {}),
new BoolSetting("enableTunnelSmartplace", enumCategories.advanced, (app, value) => {}),
@@ -308,6 +309,7 @@ class SettingsStorage {
this.clearCursorOnDeleteWhilePlacing = true;
this.displayChunkBorders = false;
this.pickMinerOnPatch = true;
this.enableMousePan = true;
this.enableColorBlindHelper = false;
@@ -525,7 +527,7 @@ export class ApplicationSettings extends ReadWriteProxy {
}
getCurrentVersion() {
return 27;
return 28;
}
/** @param {{settings: SettingsStorage, version: number}} data */
@@ -653,6 +655,11 @@ export class ApplicationSettings extends ReadWriteProxy {
data.version = 27;
}
if (data.version < 28) {
data.settings.enableMousePan = true;
data.version = 28;
}
return ExplainedResult.good();
}
}