Skip to content

Commit

Permalink
Use different color for targetsubnumber on shade
Browse files Browse the repository at this point in the history
  • Loading branch information
x-sheep committed Aug 31, 2023
1 parent 9b5bb42 commit e18187f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/puzzle/Graphic.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",

Expand Down
6 changes: 4 additions & 2 deletions src/variety-common/Graphic.js
Original file line number Diff line number Diff line change
Expand Up @@ -2095,7 +2095,7 @@ pzpr.classmgr.makeCommon({
}
},

drawTargetSubNumber: function() {
drawTargetSubNumber: function(onshade) {
var g = this.vinc("target_subnum", "crispEdges");

var d = this.range,
Expand All @@ -2108,6 +2108,7 @@ pzpr.classmgr.makeCommon({
}

var target = cursor.targetdir;
var cell = cursor.getc();

if (
cursor.disableAnum &&
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/variety/shimaguni.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@
this.drawDotCells_stostone();
}
this.drawShadedCells();
this.drawTargetSubNumber();
this.drawTargetSubNumber(true);

if (this.pid === "martini") {
this.drawCircles();
Expand Down

0 comments on commit e18187f

Please sign in to comment.