Fix spacebar at the end of a level skipping the title screen for the next level
This commit is contained in:
parent
fcab03f1d1
commit
788e4ec3bc
@ -588,13 +588,18 @@ class Player extends PrimaryView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ev.key === ' ') {
|
if (ev.key === ' ') {
|
||||||
|
// Don't scroll pls
|
||||||
|
ev.preventDefault();
|
||||||
|
|
||||||
if (this.state === 'waiting') {
|
if (this.state === 'waiting') {
|
||||||
// Start without moving
|
// Start without moving
|
||||||
this.set_state('playing');
|
this.set_state('playing');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else if (this.state === 'paused') {
|
else if (this.state === 'paused') {
|
||||||
// Turns out I do this an awful lot expecting it to work, so
|
// Turns out I do this an awful lot expecting it to work, so
|
||||||
this.set_state('playing');
|
this.set_state('playing');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else if (this.state === 'stopped') {
|
else if (this.state === 'stopped') {
|
||||||
if (this.level.state === 'success') {
|
if (this.level.state === 'success') {
|
||||||
@ -614,9 +619,8 @@ class Player extends PrimaryView {
|
|||||||
this.restart_level();
|
this.restart_level();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
// Don't scroll pls
|
|
||||||
ev.preventDefault();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ev.key === 'z') {
|
if (ev.key === 'z') {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user