(function() { "use strict"; var SelectLevelScene = function() { this.initialize(); } var p = SelectLevelScene.prototype = new creatine.Scene(); p.Scene_initialize = p.initialize; p.initialize = function() { this.Scene_initialize(); // initialize objects this.background = new createjs.Bitmap(loader.getResult('img_select')); this.buttonTutorial = createButton(340, 140, '\nTutorial', false, '56px sweetlove'), this.buttonLevel1 = createButton(160, 140, 'Level\n<', false, '56px sweetlove'), this.buttonLevel2 = createButton(160, 140, 'Level\n<<', false, '56px sweetlove'), this.buttonLevel3 = createButton(160, 140, 'Level\n<<<', false, '56px sweetlove'), this.buttonLevel4 = createButton(160, 140, 'Level\n<<<+', false, '56px sweetlove'), this.buttonLevels = [ this.buttonLevel1, this.buttonLevel2, this.buttonLevel3, this.buttonLevel4, ]; // if (localStorage['loveCraft.bestLevel'] < 1) this.buttonLevel2.visible = false; if (localStorage['loveCraft.bestLevel'] < 2) this.buttonLevel3.visible = false; if (localStorage['loveCraft.bestLevel'] < 3) this.buttonLevel4.visible = false; this.buttonBack = createButton(140, 40, 'Back'); this.buttonBack.x = 90; this.buttonBack.y = 556; // set layout var area = {x:80, y:240, width:canvas.width, height:canvas.height} var hbox = new creatine.BoxSizer(creatine.HORIZONTAL); hbox.add(this.buttonTutorial, 1, 5, creatine.TOP); hbox.layout(area); area = {x:55, y:400, width:canvas.width, height:canvas.height} hbox = new creatine.BoxSizer(creatine.HORIZONTAL); for (var i=0; i