use std::time::Duration; use bevy::{ color::palettes::basic::*, prelude::*, window::{WindowCreated, WindowResolution}, winit::WinitPlugin, }; use bevy_wayland::{input_region::InputRegion, layer_shell::LayerShellSettings, WaylandPlugin}; use smithay_client_toolkit::shell::wlr_layer::{Anchor, Layer}; const NORMAL_BUTTON: Color = Color::srgb(0.15, 0.15, 0.15); const HOVERED_BUTTON: Color = Color::srgb(0.25, 0.25, 0.25); const PRESSED_BUTTON: Color = Color::srgb(0.35, 0.75, 0.35); fn main() { App::new() .add_plugins(( DefaultPlugins .build() .disable::() .set(WindowPlugin { primary_window: Some(Window { resolution: WindowResolution::new(400.0, 400.0), ..Default::default() }), ..Default::default() }), WaylandPlugin, )) .add_systems(Startup, setup) .add_systems(Update, (button_system, exit_on_esc)) .run(); } #[allow(clippy::type_complexity)] fn button_system( mut interaction_query: Query< ( &Interaction, &mut BackgroundColor, &mut BorderColor, &Children, ), (Changed, With