From 27157710b4896e546d4b3f400069a7d661c01513 Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Wed, 22 Aug 2018 16:34:14 +0200 Subject: [PATCH] Exit on exit --- src/game.js | 4 +++- www/index.html | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/game.js b/src/game.js index ddb0c21..12dc423 100644 --- a/src/game.js +++ b/src/game.js @@ -28,7 +28,9 @@ class Game { if (this.mainScreen.after === AfterMenu.Start) { this.changeScreen(this.scene); } else if (this.mainScreen.after === AfterMenu.Exit) { - alert("I don't know how to exit"); + if (navigator.app !== undefined && typeof navigator.app.exitApp === 'function') { + navigator.app.exitApp(); + } } } } diff --git a/www/index.html b/www/index.html index 247d5ad..ad51b93 100644 --- a/www/index.html +++ b/www/index.html @@ -14,6 +14,7 @@ +