Skip to content

Commit

Permalink
Switch pause delay to 1s (15 frames)
Browse files Browse the repository at this point in the history
+ make manual backspace pause additive, so if you want to mash the
button and stay paused indefinitely you can
  • Loading branch information
sz3 committed Apr 14, 2024
1 parent 4a9e536 commit dcef5b6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions web/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,9 @@ return {
{
// pause is a cooldown. We pause to help autofocus, but we don't want to do it forever...
if (pause === undefined) {
_pause = Main.isPaused()? 0 : 32;
}
else {
_pause = pause? 32 : 0;
pause = !Main.isPaused();
}
_pause = pause? 15 : 0;
},

isPaused : function()
Expand Down Expand Up @@ -236,7 +234,7 @@ window.addEventListener('keydown', function(e) {
e.preventDefault();
}
else if (e.key == 'Backspace' || e.keyCode == 8) {
Main.togglePause();
Main.togglePause(true);
e.preventDefault();
}
}
Expand Down

0 comments on commit dcef5b6

Please sign in to comment.