diff --git a/src/game/lib/back_button.js b/src/game/lib/back_button.js index a67ce3e..1f8d400 100644 --- a/src/game/lib/back_button.js +++ b/src/game/lib/back_button.js @@ -4,22 +4,23 @@ class BackButton { let setting = new RoundRectButtonSetting(50, 50); setting.fontStyle.boundsAlignH = "center"; // left, center. right setting.fontStyle.boundsAlignV = "middle"; // top, middle, bottom + setting.strokeWidthPx = 3; setting.setStrokeColor( + 0xaa6666, + 0x884444, 0x884444, - 0xaa6666, - 0xaa6666, 0x333333 ); setting.setButtonColor( + 0xffdddd, + 0xddaaaa, 0xddaaaa, - 0xffdddd, - 0xffdddd, 0x666666 ); setting.setTextColor( + "#a66", + "#844", "#844", - "#a66", - "#a66", "#333" ); diff --git a/src/game/lib/fullscreen_button.js b/src/game/lib/fullscreen_button.js index d0934c5..e55a990 100644 --- a/src/game/lib/fullscreen_button.js +++ b/src/game/lib/fullscreen_button.js @@ -8,16 +8,17 @@ class FullscreenButton { let setting = new RoundRectButtonSetting(50, 50); setting.fontStyle.boundsAlignH = "center"; // left, center. right setting.fontStyle.boundsAlignV = "middle"; // top, middle, bottom + setting.strokeWidthPx = 3; setting.setStrokeColor( - 0x884444, - 0xaa6666, - 0xaa6666, + 0x444488, + 0x6666aa, + 0x6666aa, 0x333333 ); setting.setButtonColor( - 0xddaaaa, - 0xffdddd, - 0xffdddd, + 0xaaaadd, + 0xddddff, + 0xddddff, 0x666666 ); setting.setTextColor( diff --git a/src/game/lib/round_rect_button.js b/src/game/lib/round_rect_button.js index 1200914..eda4a1a 100644 --- a/src/game/lib/round_rect_button.js +++ b/src/game/lib/round_rect_button.js @@ -10,7 +10,7 @@ class RoundRectButtonSetting { } else { this.roundAmount = roundAmount; } - this.strokeWidth = RoundRectButtonSetting.DEFAULT_STROKE_WIDTH_PX; + this.strokeWidthPx = RoundRectButtonSetting.DEFAULT_STROKE_WIDTH_PX; this.strokeColors = RoundRectButtonSetting.DEFAULT_STROKE_COLORS; @@ -20,6 +20,7 @@ class RoundRectButtonSetting { }; setStrokeColor(out, over, down, disabled) { + this.strokeColors = { }; this.strokeColors.out = out; this.strokeColors.over = over; this.strokeColors.odownut = down; @@ -27,6 +28,7 @@ class RoundRectButtonSetting { } setButtonColor(out, over, down, disabled) { + this.buttonColors = { }; this.buttonColors.out = out; this.buttonColors.over = over; this.buttonColors.odownut = down; @@ -34,6 +36,7 @@ class RoundRectButtonSetting { } setTextColor(out, over, down, disabled) { + this.textColors = { }; this.textColors.out = out; this.textColors.over = over; this.textColors.odownut = down; @@ -120,13 +123,13 @@ class RoundRectButton { } makeButtonSprite() { - let width = this.setting.width - this.setting.strokeWidth * 2; - let height = this.setting.height - this.setting.strokeWidth * 2; + let width = this.setting.width - this.setting.strokeWidthPx * 2; + let height = this.setting.height - this.setting.strokeWidthPx * 2; let innerRoundAmount = this.setting.roundAmount * (width / this.setting.width); let btnTexture = new Phaser.Graphics() .beginFill(0xffffff) - .drawRoundedRect(this.setting.strokeWidth, this.setting.strokeWidth, width, height, innerRoundAmount) + .drawRoundedRect(this.setting.strokeWidthPx, this.setting.strokeWidthPx, width, height, innerRoundAmount) .endFill() .generateTexture(); @@ -134,8 +137,8 @@ class RoundRectButton { } makeText(textContent) { - let width = this.setting.width - this.setting.strokeWidth * 2; - let height = this.setting.height - this.setting.strokeWidth * 2; + let width = this.setting.width - this.setting.strokeWidthPx * 2; + let height = this.setting.height - this.setting.strokeWidthPx * 2; let btnText = game.add.text(0, 0, textContent, this.setting.fontStyle) .setTextBounds(0, 0, width, this.setting.height); @@ -198,8 +201,8 @@ class RoundRectButton { this.buttonStroke.x = x - this.setting.width / 2; this.buttonStroke.y = y - this.setting.height / 2; - this.button.x = x - this.setting.width / 2+ this.setting.strokeWidth; - this.button.y = y - this.setting.height / 2+ this.setting.strokeWidth; + this.button.x = x - this.setting.width / 2+ this.setting.strokeWidthPx; + this.button.y = y - this.setting.height / 2+ this.setting.strokeWidthPx; } get inputEnabled() { diff --git a/src/game/login/login.js b/src/game/login/login.js index 61ccc0b..f0e93b7 100644 --- a/src/game/login/login.js +++ b/src/game/login/login.js @@ -16,7 +16,6 @@ let Login = { // game.stage.backgroundColor = '#4d4d4d'; this.makeInputTypeTexts(); - this.makeButton(); }, @@ -71,11 +70,6 @@ let Login = { let startButton = new RoundRectButton(setting, "시작", this.startMenu); startButton.move(game.world.centerX, game.world.centerY + 140); - - icon_fullscreen = game.add.sprite(0, 0, 'icon_fullscreen'); - icon_fullscreen.width = 20; - icon_fullscreen.height = 20; - startButton.setIcon(icon_fullscreen); }, startMenu: function() {