~starkingdoms/starkingdoms

ref: 144af6a353933efbedcbfaa3b08db3c52c12dcaf starkingdoms/crates/unified/src/ship_editor/ui.rs -rw-r--r-- 1.0 KiB
144af6a3ghostly_zsh chore: move ship editor to unified codebase a day ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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 {
                position_type: PositionType::Absolute,
                margin: UiRect::AUTO.with_bottom(Val::Px(0.0)),
                width: Val::Percent(50.0),
                height: Val::Px(128.0),
                ..Default::default()
            },
            BackgroundColor(colors::MANTLE),
            children![(

            )]
        ),
        (
            Node {
                position_type: PositionType::Absolute,
                margin: UiRect::AUTO.with_left(Val::Px(0.0)),
                width: Val::Px(20.0),
                height: Val::Percent(100.0),
                ..Default::default()
            },
            BackgroundColor(colors::MANTLE),
        )],
    ));
}