feat: rename icon folder to logo folder and update rendering of UI

Former-commit-id: 7eb822d0c583a67a90aaed0c7f1a2ecd0a2613fd
This commit is contained in:
Muhammad Nauman Raza 2023-11-27 22:48:53 +00:00
parent 0491e31840
commit 7b8f4767da
6 changed files with 30 additions and 18 deletions

View file

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View file

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View file

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

View file

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View file

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View file

@ -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()
})
);
});
} }
); );
} }