Selaa lähdekoodia

Check ctrl/shift state when focusing and unfocusing the window

tags/v0.1.0
Fen Dweller 5 vuotta sitten
vanhempi
commit
cadb3d470f
No known key found for this signature in database GPG Key ID: E80B35A6F11C3656
2 muutettua tiedostoa jossa 18 lisäystä ja 0 poistoa
  1. +9
    -0
      gorge.css
  2. +9
    -0
      gorge.js

+ 9
- 0
gorge.css Näytä tiedosto

@@ -255,6 +255,15 @@ button {
width: 50%;
}

#resources-area {
top: 15%;
left: 5%;
}

#tasty-micro {
width: 30vw;
}

#upgrades-list {
max-height: 25vh !important;
}


+ 9
- 0
gorge.js Näytä tiedosto

@@ -1316,6 +1316,15 @@ window.onload = function () {
setTimeout(autosave, 60000);
}

window.onblur = function() {
controlHeld = false;
shiftHeld = false;
}

window.onfocus = function() {
window.dispatchEvent(new Event("keydown"))
}

function autosave() {
saveGame();
let x = window.innerWidth / 2;


Loading…
Peruuta
Tallenna