Skip to content

Commit

Permalink
Resolve some text color issues
Browse files Browse the repository at this point in the history
  • Loading branch information
bglw committed Feb 16, 2025
1 parent e430b10 commit 78f59f2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
21 changes: 18 additions & 3 deletions truncate_client/src/utils/mapper/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,13 +436,18 @@ impl MappedBoard {
None
};
let (variant, color) = animated_variant(player);
let text_color = if matches!(variant, MappedTileVariant::Gone) {
Some(hex_color!("#a6caa0"))
} else {
None
};

let tile_layers = Tex::board_game_tile(
variant,
tile,
orient(player),
validity_color.or(color),
None,
text_color,
None,
TileDecoration::Grass,
seed_at_coord,
Expand All @@ -461,13 +466,18 @@ impl MappedBoard {
} = change.detail.square
{
let (variant, color) = animated_variant(player);
let text_color = if matches!(variant, MappedTileVariant::Gone) {
Some(hex_color!("#a6caa0"))
} else {
None
};

let tile_layers = Tex::board_game_tile(
variant,
tile,
orient(player),
None,
color,
text_color,
None,
TileDecoration::Grass,
seed_at_coord,
Expand All @@ -486,13 +496,18 @@ impl MappedBoard {
} = change.detail.square
{
let (variant, color) = animated_variant(player);
let text_color = if matches!(variant, MappedTileVariant::Gone) {
Some(hex_color!("#a6caa0"))
} else {
None
};

let tile_layers = Tex::board_game_tile(
variant,
tile,
orient(player),
None,
color,
text_color,
None,
TileDecoration::Grass,
seed_at_coord,
Expand Down
2 changes: 1 addition & 1 deletion truncate_client/src/utils/tex/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ impl Tex {
],
color,
)
.with_piece_character(character, Some(hex_color!("#cccccc")), orientation);
.with_piece_character(character, text_color, orientation);
}
}
layers
Expand Down

0 comments on commit 78f59f2

Please sign in to comment.