~starkingdoms/starkingdoms

ref: 6aca948465e18411e666e465693deb03c97f6fd6 starkingdoms/crates/ship_editor/src/ui.rs -rw-r--r-- 567 bytes
6aca9484ghostly_zsh start ship editor, added mouse navigation 6 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use bevy::prelude::*;

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.),
            height: Val::Percent(100.),
            ..Default::default()
        },
        children![(
            Node {
                width: Val::Px(32.0),
                height: Val::Px(32.0),
                ..Default::default()
            },
            BackgroundColor(Color::LinearRgba(LinearRgba::rgb(1.0, 1.0, 1.0))),
        )],
    ));
}