Przeglądaj źródła

Make the delete and backspace keys remove the currently selected entity

tags/v0.0.3
Fen Dweller 6 lat temu
rodzic
commit
babcbdcd73
1 zmienionych plików z 9 dodań i 0 usunięć
  1. +9
    -0
      macrovision.js

+ 9
- 0
macrovision.js Wyświetl plik

@@ -653,6 +653,15 @@ document.addEventListener("DOMContentLoaded", () => {
}
});

document.addEventListener("keydown", e => {
console.log(e)
if (e.key == "Delete" || e.key == "Backspace") {
if (selected) {
removeEntity(selected);
selected = null;
}
}
})
prepareEntities();
});



Ładowanie…
Anuluj
Zapisz