mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Can now toggle unit labels with L
This commit is contained in:
parent
5a28974027
commit
91484e1c98
@ -253,6 +253,17 @@ export class OlympusApp {
|
||||
this.getUnitsManager().deselectAllUnits();
|
||||
},
|
||||
"code": "Escape"
|
||||
}).addKeyboardShortcut( "toggleUnitLabels", {
|
||||
"altKey": false,
|
||||
"callback": () => {
|
||||
const chk = document.querySelector( `label[title="Show unit labels"] input[type="checkbox"]` );
|
||||
if ( chk instanceof HTMLElement ) {
|
||||
chk.click();
|
||||
}
|
||||
},
|
||||
"code": "KeyL",
|
||||
"ctrlKey": false,
|
||||
"shiftKey": false
|
||||
});
|
||||
|
||||
["KeyW", "KeyA", "KeyS", "KeyD", "ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"].forEach(code => {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { ShortcutKeyboardOptions, ShortcutMouseOptions } from "../interfaces";
|
||||
import { Manager } from "../other/manager";
|
||||
import { Shortcut, ShortcutKeyboard, ShortcutMouse } from "./shortcut";
|
||||
import { ShortcutKeyboard, ShortcutMouse } from "./shortcut";
|
||||
|
||||
export class ShortcutManager extends Manager {
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user