Darken promote icon when in check.

This commit is contained in:
yukirij 2025-02-05 13:19:55 -08:00
parent ff4cba6775
commit 2dc8e60683

View File

@ -14,6 +14,7 @@ function INTERFACE_STYLE(id) {
TileDark: "#101010",
Promote: "#a52121",
PromoteDark: "#7f1919",
Dawn: "#ffe082",
DawnShade: "#a59154",
@ -811,7 +812,10 @@ const INTERFACE = {
ctx.rotate(Math.PI);
}
if(piece.promoted) {
GAME_ASSET.Image.Promote.draw(ctx, 1.5 * gui_scale, [0, 0], INTERFACE.Color.Promote);
let promote_color = INTERFACE.Color.Promote;
console.log("ic " + is_check);
if(is_check) { promote_color = INTERFACE.Color.PromoteDark; }
GAME_ASSET.Image.Promote.draw(ctx, 1.5 * gui_scale, [0, 0], promote_color);
}
GAME_ASSET.Image[piece_def.name].draw(ctx, 1.5 * gui_scale, [0, 0], piece_color);
}