summaryrefslogtreecommitdiff
path: root/www/js
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/js
parent59bbb0ebd81a256f59d53418a76d4105c51bb84f (diff)
downloadhtml5ks-2f57ee9ab0fef36f3701317bde03b0dd15158244.tar.xz
html5ks-2f57ee9ab0fef36f3701317bde03b0dd15158244.zip
add centered command
Diffstat (limited to 'www/js')
-rw-r--r--www/js/api.js14
1 files changed, 12 insertions, 2 deletions
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 () {