Advance from result screen on any tap/click anywhere, not just CONTINUE button
This commit is contained in:
@@ -1351,13 +1351,17 @@ class Game {
|
|||||||
}
|
}
|
||||||
document.getElementById('result-explanation').textContent=q.explanation;
|
document.getElementById('result-explanation').textContent=q.explanation;
|
||||||
|
|
||||||
document.getElementById('btn-result-cont').onclick=()=>{
|
const contBtn = document.getElementById('btn-result-cont');
|
||||||
|
const doNext = () => {
|
||||||
this.state.currentQ++;
|
this.state.currentQ++;
|
||||||
saveGame(this.state);
|
saveGame(this.state);
|
||||||
if(this.state.currentQ>=this.state.questions.length){ clearSave(); this.showComplete(); }
|
if(this.state.currentQ>=this.state.questions.length){ clearSave(); this.showComplete(); }
|
||||||
else if(MILESTONES[this.state.currentQ]) this.showLevelUp();
|
else if(MILESTONES[this.state.currentQ]) this.showLevelUp();
|
||||||
else this.showMap();
|
else this.showMap();
|
||||||
};
|
};
|
||||||
|
contBtn.onclick = doNext;
|
||||||
|
const resultScreen = document.getElementById('screen-result');
|
||||||
|
resultScreen.addEventListener('pointerdown', doNext, { once: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── LEVEL UP ─────────────────────────────────────────── */
|
/* ── LEVEL UP ─────────────────────────────────────────── */
|
||||||
|
|||||||
Reference in New Issue
Block a user