paiagram/interface/side_panel/
station_stats.rs

1use bevy::ecs::{
2    entity::Entity,
3    name::Name,
4    query::With,
5    system::{In, InMut, Query},
6};
7use egui::Ui;
8
9use crate::intervals::Station;
10
11pub fn show_station_stats(
12    (InMut(ui), In(station_entity)): (InMut<Ui>, In<Entity>),
13    station_name: Query<&Name, With<Station>>,
14) {
15    // Display basic statistics and edit functions
16    ui.heading(
17        station_name
18            .get(station_entity)
19            .map_or("Unknown", Name::as_str),
20    );
21}