Very basic title
parent
73219b442c
commit
c31801e876
@ -1,3 +1,14 @@
|
||||
/// Helper module containing common imports across the project
|
||||
pub(crate) mod prelude;
|
||||
|
||||
/// Menu plugin, state, systems
|
||||
pub(crate) mod menu;
|
||||
|
||||
use crate::prelude::*;
|
||||
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
App::new()
|
||||
.add_plugins(DefaultPlugins)
|
||||
.add_plugins(menu::MenuPlugin)
|
||||
.run();
|
||||
}
|
||||
|
||||
@ -0,0 +1,60 @@
|
||||
use crate::prelude::*;
|
||||
|
||||
pub(crate) struct MenuPlugin;
|
||||
|
||||
impl Plugin for MenuPlugin {
|
||||
fn build(&self, app: &mut App) {
|
||||
app.add_systems(Startup, init_menu);
|
||||
}
|
||||
}
|
||||
|
||||
fn init_menu(mut commands: Commands) {
|
||||
commands.spawn(Camera3dBundle { ..default() });
|
||||
commands
|
||||
.spawn(NodeBundle {
|
||||
style: Style {
|
||||
max_width: Val::Percent(60.0),
|
||||
max_height: Val::Percent(100.0),
|
||||
..default()
|
||||
},
|
||||
..default()
|
||||
})
|
||||
.with_children(|parent| {
|
||||
parent.spawn(TextBundle {
|
||||
style: Style {
|
||||
..default()
|
||||
},
|
||||
text: Text {
|
||||
justify: JustifyText::Center,
|
||||
sections: vec![
|
||||
TextSection::new(
|
||||
"ACTS",
|
||||
TextStyle {
|
||||
font_size: 384.0,
|
||||
color: Color::WHITE,
|
||||
..default()
|
||||
},
|
||||
),
|
||||
TextSection::new(
|
||||
"of\n",
|
||||
TextStyle {
|
||||
font_size: 16.0,
|
||||
color: Color::WHITE,
|
||||
..default()
|
||||
},
|
||||
),
|
||||
TextSection::new(
|
||||
"GODS",
|
||||
TextStyle {
|
||||
font_size: 384.0,
|
||||
color: Color::WHITE,
|
||||
..default()
|
||||
},
|
||||
),
|
||||
],
|
||||
..default()
|
||||
},
|
||||
..default()
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
pub(crate) use bevy::prelude::*;
|
||||
Loading…
Reference in New Issue