/// Updates the application appearance whenever the visuals are changed. This
/// occurs at application startup and whenever the user toggles light/dark mode.
Updates the application appearance whenever the visuals are changed. This
occurs at application startup and whenever the user toggles light/dark mode.
Updates the application appearance whenever the visuals are changed . This occurs at application startup and whenever the user toggles light / dark mode .
fn update_visuals(egui_ctx: Res<'_, EguiContext>, visuals: Res<'_, egui::Visuals>) {
    if visuals.is_changed() {
        egui_ctx.ctx().set_visuals(visuals.clone());
    }
}
fn update_visuals ( egui_ctx : Res < ' _ , EguiContext > , visuals : Res < ' _ , egui :: Visuals > ) { if visuals . is_changed ( ) { egui_ctx . ctx ( ) . set_visuals ( visuals . clone ( ) ) ; } }
Updates the application appearance whenever the visuals are changed.
Updates the application appearance whenever the visuals are changed .
egui_ctx
Res<'_, EguiContext>
visuals
Res<'_, egui::Visuals>