added help page (closes #15)

This commit is contained in:
Nathan DECHER
2020-04-06 22:03:20 +02:00
parent e34e7e07bd
commit a87b4679f4
5 changed files with 109 additions and 0 deletions
+16
View File
@@ -162,6 +162,22 @@
location.hash='menu';
};
// show help page
help=async () => {
stopGame();
let iframe=document.createElement('iframe');
iframe.src='help.html';
iframe.style.width='100%';
iframe.style.height='100%';
await new Popup(
"Help",
[iframe],
{ok: "OK"},
true
).display();
location.hash='menu';
};
// display the win popup
handleWin=async snek => {
// hide the HUD