Mercurial > qqw
changeset 46:5afa948f1b47
close the message box after timeout
| author | sheep@ghostwheel |
|---|---|
| date | Sun, 07 Mar 2010 19:44:23 +0100 |
| parents | afa24ecb0d45 |
| children | b0dbbcebfb1d |
| files | dw.js |
| diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/dw.js Sun Mar 07 19:36:19 2010 +0100 +++ b/dw.js Sun Mar 07 19:44:23 2010 +0100 @@ -403,8 +403,10 @@ self.close = function () { document.getElementById('game').removeChild(self); module.message = null; + clearTimeout(self.alarm); }; + self.alarm = setTimeout(self.close, 2500); document.getElementById('game').appendChild(self); module.message = self; return self;
