feat: rename icon folder to logo folder and update rendering of UI
Former-commit-id: 7eb822d0c583a67a90aaed0c7f1a2ecd0a2613fd
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
48
src/main.rs
|
@ -28,7 +28,6 @@ lazy_static!{
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
App::new()
|
App::new()
|
||||||
.insert_resource(ClearColor(HYPERNOVA.get("DARK_GRAY").copied().unwrap()))
|
|
||||||
.add_plugins(DefaultPlugins)
|
.add_plugins(DefaultPlugins)
|
||||||
.add_systems(
|
.add_systems(
|
||||||
Startup,
|
Startup,
|
||||||
|
@ -65,28 +64,41 @@ fn render_ui(
|
||||||
commands
|
commands
|
||||||
.spawn(NodeBundle {
|
.spawn(NodeBundle {
|
||||||
style: Style {
|
style: Style {
|
||||||
// fill the entire window
|
|
||||||
width: Val::Percent(100.),
|
width: Val::Percent(100.),
|
||||||
flex_direction: FlexDirection::Column,
|
height: Val::Percent(100.0),
|
||||||
align_items: AlignItems::Center,
|
justify_content: JustifyContent::SpaceBetween,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
background_color: BackgroundColor(Color::BLACK),
|
background_color: BackgroundColor(HYPERNOVA.get("DARK_GRAY").copied().unwrap()),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
.with_children(|builder| {
|
.with_children(|parent| {
|
||||||
builder.spawn(
|
parent
|
||||||
TextBundle::from_section("Ambition", text_style.clone())
|
.spawn(NodeBundle {
|
||||||
.with_text_alignment(TextAlignment::Center)
|
style: Style {
|
||||||
.with_style(Style {
|
width: Val::Percent(100.),
|
||||||
position_type: PositionType::Absolute,
|
height: Val::Percent(100.0),
|
||||||
margin: UiRect {
|
flex_direction: FlexDirection::Column,
|
||||||
top: Val::Percent(10.),
|
align_items: AlignItems::Center,
|
||||||
..default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
..default()
|
background_color: BackgroundColor(HYPERNOVA.get("DARK_GRAY").copied().unwrap()),
|
||||||
}),
|
..Default::default()
|
||||||
);
|
})
|
||||||
|
.with_children(|parent| {
|
||||||
|
parent
|
||||||
|
.spawn(TextBundle::from_section("Ambition", text_style.clone())
|
||||||
|
.with_text_alignment(TextAlignment::Center)
|
||||||
|
.with_style(Style {
|
||||||
|
position_type: PositionType::Absolute,
|
||||||
|
margin: UiRect {
|
||||||
|
top: Val::Percent(10.),
|
||||||
|
..default()
|
||||||
|
},
|
||||||
|
..default()
|
||||||
|
})
|
||||||
|
);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|