function ScreenTopUI() { this.drawBG(); } ScreenTopUI.prototype.drawBG = function() { game.add.graphics() .beginFill(0x303030, 1) .drawRect( 0, 0, game.world.width, ScreenTopUI.BG_HEIGHT ); } ScreenTopUI.prototype.makeBackButton = function(eventHandler) { this.backButton = new BackButton(eventHandler); } ScreenTopUI.prototype.makeHomeButton = function(eventHandler) { this.homeButton = new HomeButton(eventHandler); } ScreenTopUI.prototype.makeSetupButton = function(eventHandler) { var setting = new RoundRectButtonSetting(GAME_SCREEN_SIZE.x - 30, 30, 50, 50); setting.fontStyle.boundsAlignH = "center"; // left, center. right setting.fontStyle.boundsAlignV = "middle"; // top, middle, bottom var backupFontSize = setting.fontStyle.font; setting.fontStyle.font = "18px Arial"; setting.strokeWidthPx = 3; setting.setStrokeColor( 0xaa6666, 0x884444, 0x884444, 0x333333 ); setting.setButtonColor( 0xffdddd, 0xddaaaa, 0xddaaaa, 0x666666 ); setting.setTextColor( "#a66", "#844", "#844", "#333" ); this.setupButton = new RoundRectButton(setting, RoundRectButton.NONE_ICON, "설정", eventHandler); setting.fontStyle.font = backupFontSize; } ScreenTopUI.prototype.makeFullScreenButton = function() { // this.fullscreenButton = new FullscreenButton(); } ScreenTopUI.BG_HEIGHT = 60;