Created
June 1, 2013 09:48
-
-
Save nazomikan/5689852 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Window() { | |
.... | |
} | |
Window.prototype.build = function () { | |
this.setWidet(); | |
} | |
Wondow.prototype.setWidget = function () { | |
this.root.add(this.widget.tabMenue); | |
this.root.add(this.widget.screen); | |
}; | |
//------------------------------- | |
function Screen() { | |
} | |
Screen.prototype.build = function () { | |
} | |
Scree.prototype.bindAllListeners = function () { | |
pubsub.subscribe('screen.change.trigger', proxy(this.changeScene, this)); | |
} | |
Screen.prototype.changeScene = function (contextPubsub, sceneId) { | |
this.creanUp(); | |
this.root.add(this.widget.scene[sceneId]); | |
animate(function () { | |
contextPubsub.publish('animation.done'); | |
}); | |
} | |
Screen.prototype.cleanUp = function () { | |
//screen をきれいにする | |
}; | |
//----------------------------- | |
function TabMenu() { | |
} | |
TabMenu.prototype.build = function () { | |
this.bindAllListeners(); | |
} | |
TabMenu.prototype.bindAllListeners = function () { | |
} | |
TabMenu.prototype.setWidget = function () { | |
this.root.add(this.widget.button1); | |
} | |
// ----------------------------- | |
function Button() { | |
} | |
Button.prototype.build = function () { | |
this.bindAllListeners(); | |
} | |
Button.prototype.bindAllListeners = function () { | |
this.root.click(proxy(this.onClick, this)); | |
} | |
Button.prototype.onClick = function () { | |
var that = this, | |
sceneId = 1, | |
conctextPubsub = new Pubsub(); | |
contextPubsub.subscribe('animation.done', function () { | |
that.changeActive(); | |
}) | |
pubsub.publish('screen.change.trigger', contextPubsub, 1); | |
} | |
Button.prototype.changeActive = function () { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment