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

Change keybinding for multi select to ctrl

This commit is contained in:
Tobias Springer
2020-05-10 18:35:27 +02:00
parent bd89c2cc9e
commit 5a61d1813a
5 changed files with 21 additions and 4 deletions

View File

@@ -28,8 +28,8 @@ export class HUDBuildingPlacer extends BaseHUDPart {
this.fakeEntity = null;
const keyActionMapper = this.root.gameState.keyActionMapper;
keyActionMapper.getBinding("building_abort_placement").add(() => this.currentMetaBuilding.set(null));
keyActionMapper.getBinding("back").add(() => this.currentMetaBuilding.set(null));
keyActionMapper.getBinding("building_abort_placement").add(this.abortPlacement, this);
keyActionMapper.getBinding("back").add(this.abortPlacement, this);
keyActionMapper.getBinding("rotate_while_placing").add(this.tryRotate, this);
@@ -61,6 +61,13 @@ export class HUDBuildingPlacer extends BaseHUDPart {
this.buildingDescription = makeDiv(this.element, null, ["description"], "");
}
abortPlacement() {
if (this.currentMetaBuilding.get()) {
this.currentMetaBuilding.set(null);
return STOP_PROPAGATION;
}
}
/**
* mouse down pre handler
* @param {Vector} pos

View File

@@ -45,7 +45,7 @@ export class HUDKeybindingOverlay extends BaseHUDPart {
<div class="binding noPlacementOnly">
<code class="keybinding rightMouse"></code><i></i>
<code class="keybinding shift">ALT</code>+
<code class="keybinding shift">CTRL</code>+
<code class="keybinding leftMouse"></code>
<label>Delete</label>
</div>

View File

@@ -79,7 +79,7 @@ export class HUDMassSelector extends BaseHUDPart {
* @param {Vector} pos
*/
onMouseDown(pos) {
if (!this.root.app.inputMgr.altIsDown) {
if (!this.root.app.inputMgr.ctrlIsDown) {
return;
}