From fe943ef1c9487234542b7bef04b63e6a559d2a53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=A2=E1=84=91=E1=85=B3=E1=86=AF=20=E1=84=82?= =?UTF-8?q?=E1=85=A9=E1=84=90=E1=85=B3=E1=84=87=E1=85=AE=E1=86=A8?= Date: Tue, 19 Jun 2018 10:19:44 +0900 Subject: [PATCH] Fix: make typing/lib --- .../{practice => lib}/content_progress.js | 0 src/game/typing/test/content_progress.js | 39 ------------------- src/web/client/typing_practice.html | 3 +- src/web/client/typing_test.html | 3 +- 4 files changed, 4 insertions(+), 41 deletions(-) rename src/game/typing/{practice => lib}/content_progress.js (100%) delete mode 100644 src/game/typing/test/content_progress.js diff --git a/src/game/typing/practice/content_progress.js b/src/game/typing/lib/content_progress.js similarity index 100% rename from src/game/typing/practice/content_progress.js rename to src/game/typing/lib/content_progress.js diff --git a/src/game/typing/test/content_progress.js b/src/game/typing/test/content_progress.js deleted file mode 100644 index 5f3e1e8..0000000 --- a/src/game/typing/test/content_progress.js +++ /dev/null @@ -1,39 +0,0 @@ -class ContentProgress { - - constructor() { - let fontStyle = ContentProgress.DEFAULT_TEXT_FONT; - - fontStyle.align = "right"; - fontStyle.boundsAlignH = "right"; - this.typingSpeedText = game.add.text(game.world.width - 300, 0, "", fontStyle) - .setTextBounds(0, 0, 200, ContentProgress.FONT_HEIGHT_PX); - - // var grd = this.label.context.createLinearGradient(0, 0, 0, ContentProgress.FONT_HEIGHT_PX); - // grd.addColorStop(0, '#8ED6FF'); - // grd.addColorStop(1, '#004CB3'); - // this.label.fill = grd; - // this.scoreText.fill = grd; - - // this.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2); - // this.label.stroke = '#000'; - // this.label.strokeThickness = 3; - }; - - print(playingNumber, totalCount) { - if(playingNumber > totalCount) - return; - - this.typingSpeedText.text = playingNumber + " / " + totalCount; - } - -} - -ContentProgress.FONT_HEIGHT_PX = 70; - -ContentProgress.DEFAULT_TEXT_FONT = { - font: "38px Arial", - align: "center", - boundsAlignH: "center", // left, center. right - boundsAlignV: "middle", // top, middle, bottom - fill: "#fff" -}; \ No newline at end of file diff --git a/src/web/client/typing_practice.html b/src/web/client/typing_practice.html index 634f5f4..a741f65 100644 --- a/src/web/client/typing_practice.html +++ b/src/web/client/typing_practice.html @@ -49,8 +49,9 @@ + + - diff --git a/src/web/client/typing_test.html b/src/web/client/typing_test.html index a54f9f6..60a65c7 100644 --- a/src/web/client/typing_test.html +++ b/src/web/client/typing_test.html @@ -49,7 +49,8 @@ - + +