Skip to content

Commit

Permalink
Tint background when in flag mode
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexBuz committed Dec 18, 2023
1 parent 3561d2f commit 1d63c5b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions main.css
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ table {
background-color: #eee;
}

table.controls-swapped .tile:not(.revealed, .flag-permanent) {
background-color: #ddf;
}

.tile>div {
max-width: 36px;
max-height: 36px;
Expand Down
8 changes: 6 additions & 2 deletions src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,12 @@ impl<Game: Oracle> Client<Game> {
}
} else if let Some(flag) = self.flags.get(tile_id) {
contents = Some(FLAG_SYMBOL);
if game.config().mode == GameMode::Autopilot && flag.is_tentative() {
text_class = Some("text-faded");
if game.config().mode == GameMode::Autopilot {
if flag.is_tentative() {
text_class = Some("text-faded");
} else {
tile_classes.push("flag-permanent");
}
}
}
}
Expand Down

0 comments on commit 1d63c5b

Please sign in to comment.