mirror of
https://github.com/kristoferssolo/maze-ascension.git
synced 2025-10-21 19:20:34 +00:00
feat(UI): style header
This commit is contained in:
parent
f117dd5e1c
commit
101626cf3d
@ -12,8 +12,15 @@ fn spawn_title_screen(mut commands: Commands) {
|
|||||||
commands
|
commands
|
||||||
.ui_root()
|
.ui_root()
|
||||||
.insert(StateScoped(Screen::Title))
|
.insert(StateScoped(Screen::Title))
|
||||||
|
.with_children(|parent| {
|
||||||
|
parent
|
||||||
|
.spawn(Node {
|
||||||
|
bottom: Val::Px(70.),
|
||||||
|
..default()
|
||||||
|
})
|
||||||
.with_children(|parent| {
|
.with_children(|parent| {
|
||||||
parent.header("Maze Ascension");
|
parent.header("Maze Ascension");
|
||||||
|
});
|
||||||
parent.button("Play").observe(enter_gameplay_screen);
|
parent.button("Play").observe(enter_gameplay_screen);
|
||||||
|
|
||||||
#[cfg(not(target_family = "wasm"))]
|
#[cfg(not(target_family = "wasm"))]
|
||||||
|
|||||||
@ -3,9 +3,8 @@
|
|||||||
use bevy::{ecs::system::EntityCommands, prelude::*, ui::Val::*};
|
use bevy::{ecs::system::EntityCommands, prelude::*, ui::Val::*};
|
||||||
use rose_pine::RosePineDawn;
|
use rose_pine::RosePineDawn;
|
||||||
|
|
||||||
use crate::theme::{interaction::InteractionPalette, palette::*};
|
|
||||||
|
|
||||||
use super::prelude::ColorScheme;
|
use super::prelude::ColorScheme;
|
||||||
|
use crate::theme::{interaction::InteractionPalette, palette::*};
|
||||||
|
|
||||||
/// An extension trait for spawning UI widgets.
|
/// An extension trait for spawning UI widgets.
|
||||||
pub trait Widgets {
|
pub trait Widgets {
|
||||||
@ -123,7 +122,7 @@ impl Containers for Commands<'_, '_> {
|
|||||||
justify_content: JustifyContent::Center,
|
justify_content: JustifyContent::Center,
|
||||||
align_items: AlignItems::Center,
|
align_items: AlignItems::Center,
|
||||||
flex_direction: FlexDirection::Column,
|
flex_direction: FlexDirection::Column,
|
||||||
row_gap: Px(10.0),
|
row_gap: Px(32.0),
|
||||||
position_type: PositionType::Absolute,
|
position_type: PositionType::Absolute,
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user