mirror of
https://github.com/tobspr/shapez.io.git
synced 2026-02-12 19:09:21 +00:00
Add keybind for toggling vignette effect.
This commit is contained in:
parent
ed87dfd118
commit
cfc10fadb0
@ -1,10 +1,23 @@
|
||||
import { BaseHUDPart } from "../base_hud_part";
|
||||
import { makeDiv } from "../../../core/utils";
|
||||
import { DynamicDomAttach } from "../dynamic_dom_attach";
|
||||
import { KEYMAPPINGS } from "../../key_action_mapper";
|
||||
|
||||
export class HUDVignetteOverlay extends BaseHUDPart {
|
||||
createElements(parent) {
|
||||
this.element = makeDiv(parent, "ingame_VignetteOverlay");
|
||||
}
|
||||
|
||||
initialize() {}
|
||||
initialize() {
|
||||
this.visible = true;
|
||||
this.domAttach = new DynamicDomAttach(this.root, this.element);
|
||||
this.domAttach.update(this.visible);
|
||||
|
||||
this.root.keyMapper.getBinding(KEYMAPPINGS.ingame.toggleVignette).add(() => this.toggle());
|
||||
}
|
||||
|
||||
toggle() {
|
||||
this.visible = !this.visible;
|
||||
this.domAttach.update(this.visible);
|
||||
}
|
||||
}
|
||||
|
||||
@ -26,6 +26,7 @@ export const KEYMAPPINGS = {
|
||||
toggleHud: { keyCode: 113 }, // F2
|
||||
exportScreenshot: { keyCode: 114 }, // F3
|
||||
toggleFPSInfo: { keyCode: 115 }, // F4
|
||||
toggleVignette: { keyCode: 116 }, // F5
|
||||
},
|
||||
|
||||
navigation: {
|
||||
|
||||
@ -704,6 +704,7 @@ keybindings:
|
||||
toggleHud: Toggle HUD
|
||||
toggleFPSInfo: Toggle FPS and Debug Info
|
||||
exportScreenshot: Export whole Base as Image
|
||||
toggleVignette: Toggle Vignette Effect
|
||||
belt: *belt
|
||||
splitter: *splitter
|
||||
underground_belt: *underground_belt
|
||||
|
||||
Loading…
Reference in New Issue
Block a user