From 5afdd7a0a8c667b7e6863bf66f3a43617e01a2fa Mon Sep 17 00:00:00 2001 From: Victor Date: Tue, 15 Dec 2015 14:34:57 +0200 Subject: [PATCH] Debug mode --- public_html/js/Views.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/public_html/js/Views.js b/public_html/js/Views.js index 24e7f9e..eb261d2 100644 --- a/public_html/js/Views.js +++ b/public_html/js/Views.js @@ -4,6 +4,7 @@ function Views(parser) { this.parser = parser; parser.preScan(); + this.debug = rpyscript.equals('userscenario'); this.windowTag = document.getElementById("window"); this.textAuthorTag = document.getElementById("textAuthor"); this.textContentTag = document.getElementById("textContent"); @@ -61,7 +62,16 @@ Views.prototype.onTouch = function (e) { }; Views.prototype.finish = function () { - this.text('{center}{html}Вернуться на главную'); + if (this.debug) { + this.stopMusic(this.NO_FADE); + this.stopSound(this.NO_FADE); + this.stopSoundLoop(this.NO_FADE); + this.stopAmbience(this.NO_FADE); + this.spritesClear(); + this.text('{center}{html}Сценарий завершён'); + } else { + this.text('{center}{html}Вернуться на главную'); + } }; Views.prototype.windowShow = function (effect) {