function AppAreaBG(color, alpha, x, y, width, height) { game.add.graphics() .beginFill(color, alpha) .drawRect(x, y, width, height); } AppAreaBG.prototype.printText = function(text, x, y, size, color, alpha) { var fontStyle = { font: "36px Arial", fill: "#fff", align: "left", boundsAlignH: "left", boundsAlignV: "bottom" }; var titleText = game.add.text(x, y, text, fontStyle); titleText.anchor.set(0.5); titleText.fontSize = size; titleText.addColor(color, 0); titleText.alpha = alpha; } AppAreaBG.COLOR_MOUSE_APP = 0xffce54; AppAreaBG.COLOR_TYPING_APP = 0x99ccff; AppAreaBG.COLOR_TYPING_KOREAN = 0xbbccff; AppAreaBG.COLOR_TYPING_ENGLISH = 0x88bbff; AppAreaBG.GAP_X = 10; AppAreaBG.GAP_Y = 10; AppAreaBG.MARGIN_X = 20; AppAreaBG.MARGIN_Y = 10;