Fix: change color - dark_choco, darker_choco

This commit is contained in:
2019-08-26 10:10:37 +09:00
parent ef2b199cd5
commit 33f6eeead3
7 changed files with 71 additions and 93 deletions
+29 -34
View File
@@ -27,7 +27,7 @@ TypingExamination.prototype.create = function() {
(function() { this.timeOver(); }).bind(this)
);
game.stage.backgroundColor = TypingExamination.STAGE_BACKGROUND_COLOR;
game.stage.backgroundColor = TypingExamination.COLOR_STAGE_BACKGROUND_STRING;
// keyboard shortcut - useless. this.keyboard is chargning for ESC event
this.keyboardShortcut = new KeyboardShortcut();
@@ -85,7 +85,7 @@ TypingExamination.prototype.makeDefaultText = function(x, y) {
TypingExamination.prototype.makeUnderlineText = function(x, y) {
var CONTENT_TEXT_WIDTH = 800;
var CONTENT_UNDERLINE_OFFSET_Y = 17;
var CONTENT_UNDERLINE_OFFSET_Y = 20; // 17;
var graphics = game.add.graphics(0, 0);
graphics.lineStyle(1, 0x303030, 1);
@@ -126,9 +126,9 @@ TypingExamination.prototype.makeInputlineText = function(x, y) {
this.textCorrectText = this.makeDefaultText(x, y);
this.textCorrectText.fontSize = BIG_FONT_SIZE;
this.textCorrectText.style.fill = TypingExamination.COLOR_CORRECT_INPUT_STRING;
this.textCorrectText.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2)
this.textCorrectText.style.backgroundColor = TypingExamination.COLOR_CORRECT_INPUT_BACKGROUND_STRING;
var graphics = game.add.graphics(0, 0);
graphics.lineStyle(1, 0x303030, 1);
graphics.moveTo(x, y + CONTENT_UNDERLINE_OFFSET_Y + TYPING_CONTENT_UNDERLINE_OFFSET_Y);
@@ -138,25 +138,26 @@ TypingExamination.prototype.makeInputlineText = function(x, y) {
TypingExamination.prototype.makeTextContents = function() {
// typing content
var CONTENT_TEXT_WIDTH = 800;
var CONTENT_TEXT_WIDTH = 800;
var TYPING_CONTENT_X = 150; // 50;
var TYPING_CONTENT_Y = 380;
var RECORD_POSITION_X = 130; //990;
var TYPING_CONTENT_X = 150;
var TYPING_CONTENT_Y = 390;
var INPUT_TEXT_OFFSET_X = 10;
var INPUT_TEXT_OFFSET_Y = 60;
var LINE_POS_X = 130;
var BIG_FONT_SIZE = 28;
var TYPING_TEXT_OFFSET_HEIGHT = 50; //46;
var INPUT_TEXT_OFFSET_X = 10;
var INPUT_TEXT_OFFSET_Y = 60;
var TYPING_OFFSET_Y = 60;
var TYPING_PREVIEW_OFFSET_Y = 70;
var DONE_OFFSET_Y = 60;
var PREVIEW_OFFSET_Y = 130;
var TEXT_HEIGHT = 50;
var BIG_FONT_SIZE = 28;
// input content
this.makeInputlineText(TYPING_CONTENT_X, TYPING_CONTENT_Y);
this.textTypingLine = this.makeLineText(RECORD_POSITION_X, TYPING_CONTENT_Y);
this.textTypingLine = this.makeLineText(LINE_POS_X, TYPING_CONTENT_Y);
// typed done contents
@@ -167,14 +168,14 @@ TypingExamination.prototype.makeTextContents = function() {
for(var i = 0; i < TypingExamination.TYPING_CONTENT_DONE_COUNT; i++) {
this.textTypingContentsDone[i] = this.makeUnderlineText(
TYPING_CONTENT_X,
TYPING_CONTENT_Y - TYPING_OFFSET_Y - i * TYPING_TEXT_OFFSET_HEIGHT,
TYPING_CONTENT_Y - DONE_OFFSET_Y - i * TEXT_HEIGHT,
);
this.textTypingContentsDone[i].style.fill = TypingExamination.COLOR_CORRECT_INPUT_STRING;
this.textTypingContentsDone[i].style.fill = TypingExamination.COLOR_DONE_INPUT_STRING;
this.textTypingContentsDone[i].style.backgroundColor = TypingExamination.COLOR_CORRECT_INPUT_BACKGROUND_STRING;
this.textTypingRecordsDone[i] = this.makeLineText(
RECORD_POSITION_X,
TYPING_CONTENT_Y - TYPING_OFFSET_Y - i * TYPING_TEXT_OFFSET_HEIGHT,
LINE_POS_X,
TYPING_CONTENT_Y - DONE_OFFSET_Y - i * TEXT_HEIGHT,
);
}
@@ -186,13 +187,13 @@ TypingExamination.prototype.makeTextContents = function() {
for(var i = 0; i < TypingExamination.TYPING_CONTENT_PREVIEW_COUNT; i++) {
this.textTypingContentPreview[i] = this.makeUnderlineText(
TYPING_CONTENT_X,
TYPING_CONTENT_Y + TYPING_OFFSET_Y + TYPING_PREVIEW_OFFSET_Y + i * TYPING_TEXT_OFFSET_HEIGHT,
TYPING_CONTENT_Y + PREVIEW_OFFSET_Y + i * TEXT_HEIGHT,
);
this.textTypingContentPreview[i].style.fill = TypingExamination.COLOR_NOT_INPUT_STRING;
this.textLineNumber[i] = this.makeLineText(
RECORD_POSITION_X,
TYPING_CONTENT_Y + TYPING_OFFSET_Y + TYPING_PREVIEW_OFFSET_Y + i * TYPING_TEXT_OFFSET_HEIGHT,
LINE_POS_X,
TYPING_CONTENT_Y + PREVIEW_OFFSET_Y + i * TEXT_HEIGHT,
);
}
@@ -606,21 +607,15 @@ TypingExamination.GAME_TIME_SEC = 60 * 5; // 5 minutes
TypingExamination.SPACE_INDICATOR = "␣"; // "ˇ"; // "ᵔ"; // "ᵕ"; // "ˣ"; // "ᵛ"; // " · ";
TypingExamination.ENTER_INDICATOR = "⏎"; // "↵"; // "↵";
TypingExamination.TYPING_CONTENT_PREVIEW_COUNT = 4; // 3;
TypingExamination.TYPING_CONTENT_DONE_COUNT = 4; // 3;
TypingExamination.TYPING_CONTENT_PREVIEW_COUNT = 4;
TypingExamination.TYPING_CONTENT_DONE_COUNT = 4;
TypingExamination.TYPING_COUNT_PLUS_ENTER = 1;
TypingExamination.OFFSET_RIGHT_ALIGN = 10;
TypingExamination.WORD_COUNT_FOR_STAGE = 10;
TypingExamination.COLOR_CONTENT_INPUT_STRING = "#dddddd";
TypingExamination.COLOR_CORRECT_INPUT = "#ffff4d";
TypingExamination.COLOR_NOT_INPUT_STRING = MainColor.DARK_GRAY_STRING;
TypingExamination.COLOR_NEXT_INPUT_STRING = MainColor.GOLD_STRING; // MainColor.LIGHT_CHOCO_STRING;
TypingExamination.COLOR_CORRECT_INPUT_STRING = MainColor.YELLOW_STRING; // MainColor.CYAN_STRING;
TypingExamination.COLOR_NEXT_INPUT_STRING = MainColor.GOLD_STRING;
TypingExamination.COLOR_CORRECT_INPUT_STRING = MainColor.YELLOW_STRING;
TypingExamination.COLOR_DONE_INPUT_STRING = MainColor.MOCCASIN_STRING;
TypingExamination.STAGE_BACKGROUND_COLOR = "#4d4d4d";
TypingExamination.COLOR_STAGE_BACKGROUND_STRING = "#4d4d4d";
TypingExamination.COLOR_NEXT_INPUT_BACKGROUND_STRING = MainColor.DARKER_CHOCO_STRING;
TypingExamination.COLOR_CORRECT_INPUT_BACKGROUND_STRING = MainColor.DARK_CHOCO_STRING; // MainColor.DARK_CYAN_STRING; // "#333333";
TypingExamination.COLOR_CORRECT_INPUT_BACKGROUND_STRING = MainColor.DARK_CHOCO_STRING;