add red/green circle indicator beside Block/Unblock buttons

This commit is contained in:
2025-04-19 10:35:47 +01:00
parent 09f5a3895b
commit 18052d0c78
4 changed files with 190 additions and 4 deletions
+9
View File
@@ -156,6 +156,15 @@ impl App {
{
self.game_networking.unblock_all();
}
let tint = match self.game_networking.is_blocked {
true => egui::Color32::from_hex("#f96554").unwrap(),
false => egui::Color32::from_hex("#68f954").unwrap(),
};
ui.add(
egui::Image::new(egui::include_image!("../../assets/circle.svg"))
.max_size([4.0, 4.0].into())
.tint(tint),
);
});
});
response.response.on_disabled_hover_text(