feat(UI): style header

This commit is contained in:
Kristofers Solo 2025-01-05 18:29:16 +02:00
parent f117dd5e1c
commit 101626cf3d
2 changed files with 10 additions and 4 deletions

View File

@ -13,7 +13,14 @@ fn spawn_title_screen(mut commands: Commands) {
.ui_root()
.insert(StateScoped(Screen::Title))
.with_children(|parent| {
parent.header("Maze Ascension");
parent
.spawn(Node {
bottom: Val::Px(70.),
..default()
})
.with_children(|parent| {
parent.header("Maze Ascension");
});
parent.button("Play").observe(enter_gameplay_screen);
#[cfg(not(target_family = "wasm"))]

View File

@ -3,9 +3,8 @@
use bevy::{ecs::system::EntityCommands, prelude::*, ui::Val::*};
use rose_pine::RosePineDawn;
use crate::theme::{interaction::InteractionPalette, palette::*};
use super::prelude::ColorScheme;
use crate::theme::{interaction::InteractionPalette, palette::*};
/// An extension trait for spawning UI widgets.
pub trait Widgets {
@ -123,7 +122,7 @@ impl Containers for Commands<'_, '_> {
justify_content: JustifyContent::Center,
align_items: AlignItems::Center,
flex_direction: FlexDirection::Column,
row_gap: Px(10.0),
row_gap: Px(32.0),
position_type: PositionType::Absolute,
..default()
},