diff options
Diffstat (limited to 'www')
-rw-r--r-- | www/index.html | 2 | ||||
-rw-r--r-- | www/js/html5ks.js | 7 | ||||
-rw-r--r-- | www/js/menu.js | 12 |
3 files changed, 9 insertions, 12 deletions
diff --git a/www/index.html b/www/index.html index b6d2321..540900c 100644 --- a/www/index.html +++ b/www/index.html @@ -60,7 +60,7 @@ <img class="status" id="skip" src="dump/ui/sd-skip.png"> <div id="main-menu" style="display: none;"> <div id="main-menu-buttons" style="top: 377px; position: absolute; left: 81px;"> - <div id="start" class="button main_menu_start"></div> + <div id="start" class="button main_menu_start disabled"></div> <div id="load" class="button main_menu_load disabled"></div> <div id="extras" class="button main_menu_extra disabled"></div> <div class="options-button main_menu_config button"></div> diff --git a/www/js/html5ks.js b/www/js/html5ks.js index 74ab43b..502ca75 100644 --- a/www/js/html5ks.js +++ b/www/js/html5ks.js @@ -218,10 +218,9 @@ window.html5ks = { } }, start: function () { - this.fetch("json", "script").then(function () { - html5ks.api.movie_cutscene("4ls", true).then(function () { - html5ks.menu.mainMenu(); - }); + this.fetch("json", "script"); + html5ks.api.movie_cutscene("4ls", true).then(function () { + html5ks.menu.mainMenu(); }); }, fetch: function (type, name) { diff --git a/www/js/menu.js b/www/js/menu.js index 1b826b3..77ae7ee 100644 --- a/www/js/menu.js +++ b/www/js/menu.js @@ -184,16 +184,14 @@ this.initEvents(); this.initOptions(); - this.elements.main.start.addEventListener("click", function () { - if (this._imachine_loaded) { + when.all([html5ks.fetch("json", "imachine"), + html5ks.fetch("json", "script")]).then(function () { + var start = this.elements.main.start; + start.addEventListener("click", function () { this.elements.mainMenu.style.display = "none"; html5ks.imachine.start().then(this.mainMenu.bind(this)); - } - }.bind(this), false); - html5ks.fetch("json", "imachine").then(function () { - var start = this.elements.main.start; + }.bind(this), false); start.className = start.className.replace("disabled", ""); - this._imachine_loaded = true; }.bind(this)); }, |