diff options
-rw-r--r-- | www/css/index.css | 14 | ||||
-rw-r--r-- | www/index.html | 5 | ||||
-rw-r--r-- | www/js/api.js | 14 |
3 files changed, 27 insertions, 6 deletions
diff --git a/www/css/index.css b/www/css/index.css index 19651da..4a1dbf5 100644 --- a/www/css/index.css +++ b/www/css/index.css @@ -55,8 +55,10 @@ body { left: 12px; font-weight: bold; } -#say { +.say { color: white; +} +#say { width: 750px; height: 90px; position: absolute; @@ -164,9 +166,17 @@ input[type="checkbox"]:checked + span:before { } #nvlsay { padding: 15px 35px; - color: white; } .nvl-block { display: block; margin: 10px 8px; } +#centered { + width: 100%; + text-align: center; + position: absolute; + top: 0; + bottom: 0; + height: 0; + margin: auto; +} diff --git a/www/index.html b/www/index.html index 729d26a..abf4855 100644 --- a/www/index.html +++ b/www/index.html @@ -48,14 +48,15 @@ <div id="window" style="display: none;"> <img id="window-image" src="dump/ui/bg-say.png" alt=""> <div id="who"></div> - <div id="say"></div> + <div id="say" class="say"></div> <img id="ctc" src="dump/ui/ctc.png" style="display: none"> </div> <div id="nvl" style="display: none;"> - <div id="nvlsay"></div> + <div id="nvlsay" class="say"></div> <img id="nvlctc" src="dump/ui/ctc_rotated.png"> </div> <div id="choices"></div> + <div id="centered" class="say"></div> <div id="main-menu" style="display: none;"> <div id="main-menu-buttons" style="top: 377px; position: absolute; left: 81px;"> <div id="start" class="button button-enabled">Start</div> diff --git a/www/js/api.js b/www/js/api.js index 320845a..957bcf0 100644 --- a/www/js/api.js +++ b/www/js/api.js @@ -155,8 +155,7 @@ window.html5ks.api = { } deferred.resolve(action); return deferred.promise; - }, - + }, // NOT iscene scene: function (type, name) { var deferred = when.defer(), @@ -344,6 +343,17 @@ window.html5ks.api = { return deferred.promise; }, + centered: function (text) { + var deferred = when.defer(), + centered = document.getElementById("centered"); + centered.innerHTML = this.tag(text); + html5ks.next = function () { + centered.innerHTML = ""; + deferred.resolve(); + }; + return deferred.promise; + }, + menu: function (char, str, choices) { var deferred = when.defer(); this.character(char, str).then(function () { |