Display chunk states in proxy's plot

This commit is contained in:
IQuant 2024-08-30 21:33:44 +03:00
parent 3651779df9
commit f3376cd589
3 changed files with 42 additions and 1 deletions

View file

@ -911,7 +911,15 @@ impl eframe::App for App {
if self.show_map_plot {
if ui.button("Close plot").clicked() {
self.show_map_plot = false;
}
ctx.request_repaint_after(Duration::from_millis(16));
let build_fn = |plot: &mut PlotUi| {
let markers = netman.debug_markers.lock().unwrap();
for marker in markers.iter() {
plot.text(Text::new(PlotPoint::new(marker.x, -marker.y), marker.message));
}
netman.world_info.with_player_infos(|peer, info| {
let username = if netman.peer.is_steam() {
let steam = self.steam_state.as_mut().expect(
@ -1104,4 +1112,4 @@ fn peer_role(peer: net::omni::OmniPeerId, netman: &Arc<net::NetManager>) -> Stri
} else {
tr("player_player")
}
}
}