diff --git a/src/game/lib/button/round_rect_button.js b/src/game/lib/button/round_rect_button.js index 031f635..cd45f1f 100644 --- a/src/game/lib/button/round_rect_button.js +++ b/src/game/lib/button/round_rect_button.js @@ -16,6 +16,7 @@ function RoundRectButtonSetting(x, y, width, height, roundAmount) { this.strokeColors = RoundRectButtonSetting.DEFAULT_STROKE_COLORS; this.buttonColors = RoundRectButtonSetting.DEFAULT_BUTTON_COLORS; this.textColors = RoundRectButtonSetting.DEFAULT_TEXT_COLORS; + this.iconColors = RoundRectButtonSetting.DEFAULT_ICON_COLORS; this.fontStyle = RoundRectButtonSetting.DEFAULT_TEXT_FONT; }; @@ -43,6 +44,14 @@ RoundRectButtonSetting.prototype.setTextColor = function(out, over, down, disabl this.textColors.disabled = disabled; } +RoundRectButtonSetting.prototype.setIconColor = function(out, over, down, disabled) { + this.iconColors = { }; + this.iconColors.out = out; + this.iconColors.over = over; + this.iconColors.down = down; + this.iconColors.disabled = disabled; +} + RoundRectButtonSetting.DEFAULT_STROKE_COLORS = { out: 0x666666, @@ -65,6 +74,13 @@ RoundRectButtonSetting.DEFAULT_TEXT_COLORS = { disabled: "#999" }; +RoundRectButtonSetting.DEFAULT_ICON_COLORS = { + out: 0xffffff, + over: 0xddffdd, + down: 0xaaffaa, + disabled: 0x333333 +}; + RoundRectButtonSetting.DEFAULT_TEXT_FONT = { font: "30px Arial", boundsAlignH: "center", // left, center. right @@ -212,7 +228,7 @@ RoundRectButton.prototype.mouseOut = function() { this.buttonStroke.tint = this.setting.strokeColors.out; this.button.tint = this.setting.buttonColors.out; if(typeof this.buttonIcon !== "undefined") { - this.buttonIcon.tint = this.setting.strokeColors.out; + this.buttonIcon.tint = this.setting.iconColors.out; } } @@ -223,7 +239,7 @@ RoundRectButton.prototype.mouseOver = function() { this.buttonStroke.tint = this.setting.strokeColors.over; this.button.tint = this.setting.buttonColors.over; if(typeof this.buttonIcon !== "undefined") { - this.buttonIcon.tint = this.setting.strokeColors.over; + this.buttonIcon.tint = this.setting.iconColors.over; } } @@ -234,7 +250,7 @@ RoundRectButton.prototype.mouseDown = function() { this.buttonStroke.tint = this.setting.strokeColors.down; this.button.tint = this.setting.buttonColors.down; if(typeof this.buttonIcon !== "undefined") { - this.buttonIcon.tint = this.setting.strokeColors.down; + this.buttonIcon.tint = this.setting.iconColors.down; } } @@ -245,7 +261,7 @@ RoundRectButton.prototype.buttonDisabled = function() { this.buttonStroke.tint = this.setting.strokeColors.disabled; this.button.tint = this.setting.buttonColors.disabled; if(typeof this.buttonIcon !== "undefined") { - this.buttonIcon.tint = this.setting.strokeColors.disabled; + this.buttonIcon.tint = this.setting.iconColors.disabled; } } diff --git a/src/game/lib/button/typing_app_button.js b/src/game/lib/button/typing_app_button.js index 418b488..58c3676 100644 --- a/src/game/lib/button/typing_app_button.js +++ b/src/game/lib/button/typing_app_button.js @@ -50,6 +50,12 @@ function TypingAppButton(type, x, y, iconSprite, buttonText, appInfo) { "#a66", "#333" ); + setting.setIconColor( + 0xffeeee, + 0xeedddd, + 0xddcccc, + 0x666666 + ); break; } diff --git a/src/game/lib/date_util.js b/src/game/lib/util/date_util.js similarity index 100% rename from src/game/lib/date_util.js rename to src/game/lib/util/date_util.js diff --git a/src/game/lib/number_util.js b/src/game/lib/util/number_util.js similarity index 62% rename from src/game/lib/number_util.js rename to src/game/lib/util/number_util.js index 1edb626..6499e54 100644 --- a/src/game/lib/number_util.js +++ b/src/game/lib/util/number_util.js @@ -21,4 +21,17 @@ NumberUtil.getRecordText = function(value) { return numberWithCommas + " 타"; else return numberWithCommas + " 점"; -} \ No newline at end of file +} + + +NumberUtil.hexToRGB = function(hexCode) { + var hex = ""; + if(hexCode.length == 4) + hex = "#" + hexCode[1] + hexCode[1] + hexCode[2] + hexCode[2] + hexCode[3] + hexCode[3]; + + var hexValue = "0x" + hex[1] + hex[1] + hex[2] + hex[2] + hex[3] + hex[3]; + // console.log(hexCode); + // console.log(hexValue); + return hexValue; +} + diff --git a/src/game/lib/record_util.js b/src/game/lib/util/record_util.js similarity index 100% rename from src/game/lib/record_util.js rename to src/game/lib/util/record_util.js diff --git a/src/game/lib/string_util.js b/src/game/lib/util/string_util.js similarity index 100% rename from src/game/lib/string_util.js rename to src/game/lib/util/string_util.js diff --git a/src/game/license_timer/timer.js b/src/game/license_timer/timer.js index a539b63..5262fe0 100644 --- a/src/game/license_timer/timer.js +++ b/src/game/license_timer/timer.js @@ -121,27 +121,26 @@ Timer.prototype.makeResetButton = function() { setting.fontStyle.fontSize = 40; setting.setStrokeColor( - 0x309090, - 0x208080, - 0x205050, + 0x900020, + 0x800010, + 0x600000, 0x666666 ); setting.setButtonColor( - 0x40c0c0, - 0x30a0a0, - 0x208080, + 0xc00040, + 0xa00020, + 0x800010, 0x666666 ); - setting.setTextColor( - "#fff", - "#edd", - "#dbb", - "#333" + setting.setIconColor( + 0xffffff, + 0xdddddd, + 0xbbbbbb, + 0x333333 ); var button = new RoundRectButton( - setting, - null, "", + setting, null, "", (function() { this.resetTimer(); this.resetLeftTimeToServer(); @@ -162,27 +161,26 @@ Timer.prototype.makePlayButton = function() { // blue tone setting.setStrokeColor( - 0x808020, - 0x606010, - 0x404000, + 0xd0d020, + 0xb0b010, + 0x909000, 0x333333 ); setting.setButtonColor( - 0xc0c040, - 0xa0a030, - 0x909020, + 0xf0f040, + 0xd0d030, + 0xb0b020, 0x666666 ); - setting.setTextColor( - "#fff", - "#fff", - "#fff", - "#333" + setting.setIconColor( + 0x906020, // 0x442211, + 0x704010, // 0x332200, + 0x502000, // 0x111100, + 0x333333 ); var button = new RoundRectButton( - setting, - null, "", + setting, null, "", (function() { this.startTimer(); }).bind(this) ); button.setIcon(new SpriteIconTimer(100, 100, SpriteIconTimer.FRAME_PLAY)); @@ -214,17 +212,16 @@ Timer.prototype.makePauseButton = function() { 0xb0b0b0, 0x666666 ); - setting.setTextColor( - "#333", - "#222", - "#111", - "#333" + setting.setIconColor( + 0x444444, + 0x333333, + 0x222222, + 0x333333 ); var button = new RoundRectButton( - setting, - new SpriteIconTimer(50, 50, SpriteIconTimer.FRAME_PAUSE), "", + setting, null, "", (function() { this.pauseTimer(); @@ -323,7 +320,7 @@ Timer.prototype.resetTimer = function() { this.pauseTimer(); this.isTimerGoingOn = false; - this.setTimerTextColor(Timer.TEXT_COLOR_CYAN); + this.setTimerTextColor(Timer.TEXT_COLOR_WHITE); } Timer.prototype.tickLeftTime = function() { @@ -633,6 +630,7 @@ Timer.TYPE_MINUTE = "minute"; Timer.TYPE_SECOND = "second"; +Timer.TEXT_COLOR_WHITE = 0xffffff; Timer.TEXT_COLOR_CYAN = 0x40c0c0; Timer.TEXT_COLOR_YELLOW = 0xe0e040; Timer.TEXT_COLOR_GREY = 0xa0a0a0; diff --git a/src/web/client/ads.html b/src/web/client/ads.html index 158717f..3b14115 100644 --- a/src/web/client/ads.html +++ b/src/web/client/ads.html @@ -28,6 +28,9 @@ + + + @@ -37,10 +40,11 @@ + + + + - - - @@ -83,5 +87,8 @@
+