added unListenTo method

This commit is contained in:
Jono Brandel 2011-01-31 15:50:06 -08:00
parent c3fd69b95a
commit b1631b0327

8
gui.js
View File

@ -217,7 +217,13 @@ var GUI = function() {
};
this.unlistenTo = function(controller) {
// TODO
// TODO: test this
for(var i = 0; i < listening.length; i++) {
if(listening[i] == controller) listening.splice(i, 1);
}
if(listening.length <= 0) {
clearInterval(listenInterval);
}
};
this.listen = function(whoToListenTo) {