//! This example illustrates how to create a button that changes color and text based on its //! interaction state. use bevy::{prelude::*, winit::WinitSettings}; use bevy_ui_styled::{colors::WHITE, styled, StyledPlugin}; use bevy_ui_styled_macros::styled_bundle; fn main() { App::new() .add_plugins((DefaultPlugins, StyledPlugin)) .insert_resource(WinitSettings::desktop_app()) .add_systems(Startup, setup) .add_systems(Update, (on_button_interact, on_count_changed)) .run(); } #[derive(Component, Deref, DerefMut)] struct Count(i32); #[derive(Component)] struct Increment; #[derive(Component)] struct Decrement; #[allow(clippy::type_complexity)] fn on_button_interact( mut interaction_query: Query< (&Interaction, Option<&Increment>, Option<&Decrement>), (Changed, With