From 1d63c5b6b2198bf7c4f72acb0ebc40b1b3d60d23 Mon Sep 17 00:00:00 2001 From: AlexBuz Date: Mon, 18 Dec 2023 02:13:54 -0600 Subject: [PATCH] Tint background when in flag mode --- main.css | 4 ++++ src/client/mod.rs | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/main.css b/main.css index f9469be..e24107a 100644 --- a/main.css +++ b/main.css @@ -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; diff --git a/src/client/mod.rs b/src/client/mod.rs index 57d29b6..be4eb3b 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -404,8 +404,12 @@ impl Client { } } 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"); + } } } }