From e18187f3ca59be2eb2d2c880ec36e4c5c3c69d05 Mon Sep 17 00:00:00 2001 From: Lennard Sprong Date: Thu, 31 Aug 2023 18:20:36 +0200 Subject: [PATCH] Use different color for targetsubnumber on shade --- src/puzzle/Graphic.js | 1 + src/variety-common/Graphic.js | 6 ++++-- src/variety/shimaguni.js | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/puzzle/Graphic.js b/src/puzzle/Graphic.js index ea6845785..5824bb195 100644 --- a/src/puzzle/Graphic.js +++ b/src/puzzle/Graphic.js @@ -107,6 +107,7 @@ targetColorPlay: "rgb(64, 64, 255)", targetColorTrial: "rgb(255, 64, 255)", ttcolor: "rgb(127,255,127)", // ques=51の入力ターゲット(TargetTriangle) + ttshadecolor: "rgb(0,127,0)", movecolor: "red", diff --git a/src/variety-common/Graphic.js b/src/variety-common/Graphic.js index 99cebda7c..f644238b8 100644 --- a/src/variety-common/Graphic.js +++ b/src/variety-common/Graphic.js @@ -2095,7 +2095,7 @@ pzpr.classmgr.makeCommon({ } }, - drawTargetSubNumber: function() { + drawTargetSubNumber: function(onshade) { var g = this.vinc("target_subnum", "crispEdges"); var d = this.range, @@ -2108,6 +2108,7 @@ pzpr.classmgr.makeCommon({ } var target = cursor.targetdir; + var cell = cursor.getc(); if ( cursor.disableAnum && @@ -2117,7 +2118,8 @@ pzpr.classmgr.makeCommon({ } g.vid = "target_subnum"; - g.fillStyle = this.ttcolor; + g.fillStyle = + onshade && cell && cell.isShade() ? this.ttshadecolor : this.ttcolor; if (this.puzzle.playmode && target !== 0) { var bw = this.bw, bh = this.bh; diff --git a/src/variety/shimaguni.js b/src/variety/shimaguni.js index dab445dea..2020b0ed0 100644 --- a/src/variety/shimaguni.js +++ b/src/variety/shimaguni.js @@ -388,7 +388,7 @@ this.drawDotCells_stostone(); } this.drawShadedCells(); - this.drawTargetSubNumber(); + this.drawTargetSubNumber(true); if (this.pid === "martini") { this.drawCircles();