Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var vers = new versionCookie();
- function StageAssistant() {
- /* this is the creator function for your stage assistant object */
- };
- StageAssistant.prototype.setup = function() {
- /* this function is for setup tasks that have to happen when the stage is first created */
- this.controller.pushScene("main");
- appMenu = {
- visible: true,
- items: [
- Mojo.Menu.editItem,
- {
- label: $L("Preferences & Accounts"),
- command: 'do-prefs'
- },
- {
- label: $L("Help"),
- command: 'do-helpGen'
- },
- /*
- {
- label: $L("Help..."),
- command: 'do-help'
- },
- */
- ]
- };
- //Get cookie
- /*myCookie = new Mojo.Model.Cookie('MyCookie');
- cookieData = myCookie.get() || '';
- if(cookieData =='') {
- this.controller.pushScene("changelog");
- myCookie.put({ firstuse:true });
- }
- else{
- this.controller.pushScene("main");
- }*/
- };
- StageAssistant.prototype.launchFirstScene = function(controller) {
- vers.init();
- if (vers.showStartupScene()) {
- controller.pushScene('changelog');
- }
- else {
- controller.pushScene('main');
- }
- }
- StageAssistant.prototype.handleCommand = function (event) {
- var currentScene = this.controller.activeScene();
- switch(event.type) {
- case Mojo.Event.commandEnable:
- case Mojo.Event.command:
- switch (event.command) {
- case 'do-prefs':
- this.controller.pushScene("prefs");
- break;
- case 'do-helpGen':
- this.controller.pushAppSupportInfoScene();
- break;
- /*
- case 'do-help':
- this.controller.pushScene("support");
- break;
- */
- }
- break;
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement