Add inside border to last moved piece.

This commit is contained in:
yukirij 2024-10-13 10:45:03 -07:00
parent cec083ac96
commit 44dea6e7b4

View File

@ -614,6 +614,12 @@ const INTERFACE = {
if(!is_hover && draw_piece && piece !== null) { draw.hints(piece); }
// Draw background
if(background_scale < 0.94) {
ctx.fillStyle = border_color;
ctx.beginPath();
draw.hex(0.94);
ctx.fill();
}
ctx.fillStyle = background_color;
ctx.beginPath();
draw.hex(background_scale);
@ -999,16 +1005,12 @@ const INTERFACE = {
}
animation_piece(piece, x, y) {
let radius = INTERFACE.Radius * this.scale;
let icon_radius = 0.69 * radius;
this.ctx.save();
this.ctx.translate(x, y);
// Draw border
if(piece.player == GAME.Const.Player.Dawn) { this.ctx.fillStyle = INTERFACE.Color.DawnDark; }
else { this.ctx.fillStyle = INTERFACE.Color.DuskDark; }
this.ctx.beginPath();
this.hex();
this.ctx.fill();
@ -1018,6 +1020,13 @@ const INTERFACE = {
this.hints(piece);
}
// Draw inside border
if(piece.player == GAME.Const.Player.Dawn) { this.ctx.fillStyle = INTERFACE.Color.DawnDark; }
else { this.ctx.fillStyle = INTERFACE.Color.DuskDark; }
this.ctx.beginPath();
this.hex(0.94);
this.ctx.fill();
// Draw background.
if(piece.player == GAME.Const.Player.Dawn) { this.ctx.fillStyle = INTERFACE.Color.DawnDarkest; }
else { this.ctx.fillStyle = INTERFACE.Color.DuskDarkest; }