summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorAlex Xu <alex_y_xu@yahoo.ca>2013-07-02 16:18:57 -0400
committerAlex Xu <alex_y_xu@yahoo.ca>2013-07-02 16:18:57 -0400
commit2f57ee9ab0fef36f3701317bde03b0dd15158244 (patch)
treed2da85eec5874787ddd529401074b4ebd50fa350 /www
parent59bbb0ebd81a256f59d53418a76d4105c51bb84f (diff)
downloadhtml5ks-2f57ee9ab0fef36f3701317bde03b0dd15158244.tar.xz
html5ks-2f57ee9ab0fef36f3701317bde03b0dd15158244.zip
add centered command
Diffstat (limited to 'www')
-rw-r--r--www/css/index.css14
-rw-r--r--www/index.html5
-rw-r--r--www/js/api.js14
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 () {