Add inside border to last moved piece.
This commit is contained in:
parent
cec083ac96
commit
44dea6e7b4
@ -614,6 +614,12 @@ const INTERFACE = {
|
|||||||
if(!is_hover && draw_piece && piece !== null) { draw.hints(piece); }
|
if(!is_hover && draw_piece && piece !== null) { draw.hints(piece); }
|
||||||
|
|
||||||
// Draw background
|
// Draw background
|
||||||
|
if(background_scale < 0.94) {
|
||||||
|
ctx.fillStyle = border_color;
|
||||||
|
ctx.beginPath();
|
||||||
|
draw.hex(0.94);
|
||||||
|
ctx.fill();
|
||||||
|
}
|
||||||
ctx.fillStyle = background_color;
|
ctx.fillStyle = background_color;
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
draw.hex(background_scale);
|
draw.hex(background_scale);
|
||||||
@ -999,16 +1005,12 @@ const INTERFACE = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
animation_piece(piece, x, y) {
|
animation_piece(piece, x, y) {
|
||||||
let radius = INTERFACE.Radius * this.scale;
|
|
||||||
let icon_radius = 0.69 * radius;
|
|
||||||
|
|
||||||
this.ctx.save();
|
this.ctx.save();
|
||||||
this.ctx.translate(x, y);
|
this.ctx.translate(x, y);
|
||||||
|
|
||||||
// Draw border
|
// Draw border
|
||||||
if(piece.player == GAME.Const.Player.Dawn) { this.ctx.fillStyle = INTERFACE.Color.DawnDark; }
|
if(piece.player == GAME.Const.Player.Dawn) { this.ctx.fillStyle = INTERFACE.Color.DawnDark; }
|
||||||
else { this.ctx.fillStyle = INTERFACE.Color.DuskDark; }
|
else { this.ctx.fillStyle = INTERFACE.Color.DuskDark; }
|
||||||
|
|
||||||
this.ctx.beginPath();
|
this.ctx.beginPath();
|
||||||
this.hex();
|
this.hex();
|
||||||
this.ctx.fill();
|
this.ctx.fill();
|
||||||
@ -1018,6 +1020,13 @@ const INTERFACE = {
|
|||||||
this.hints(piece);
|
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.
|
// Draw background.
|
||||||
if(piece.player == GAME.Const.Player.Dawn) { this.ctx.fillStyle = INTERFACE.Color.DawnDarkest; }
|
if(piece.player == GAME.Const.Player.Dawn) { this.ctx.fillStyle = INTERFACE.Color.DawnDarkest; }
|
||||||
else { this.ctx.fillStyle = INTERFACE.Color.DuskDarkest; }
|
else { this.ctx.fillStyle = INTERFACE.Color.DuskDarkest; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user