use bevy::prelude::*; use crate::client::colors; pub fn ui_plugin(app: &mut App) { app.add_systems(Startup, setup_ui); } fn setup_ui(mut commands: Commands) { commands.spawn(( Node { width: Val::Percent(100.0), height: Val::Percent(100.0), ..Default::default() }, children![( Node { display: Display::Flex, position_type: PositionType::Absolute, width: Val::Px(200.0), height: Val::Px(150.0), top: Val::Px(5.0), right: Val::Px(5.0), ..Default::default() }, BorderRadius::all(Val::Px(5.0)), BackgroundColor(colors::MANTLE), children![( Node { width: Val::Percent(100.0), height: Val::Px(20.0), margin: UiRect::all(Val::Px(5.0)), ..Default::default() }, BorderRadius::all(Val::Px(5.0)), BackgroundColor(colors::CRUST), )], )], )); }