mirror of
https://github.com/eliasstepanik/big_space_with_trim.git
synced 2026-01-10 23:48:27 +00:00
switch to default font
This commit is contained in:
parent
a51174b299
commit
c0113e51e3
@ -15,7 +15,7 @@ bevy = { version = "0.11", default_features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
bevy = "0.11"
|
||||
bevy_framepace = "0.13"
|
||||
bevy_framepace = { version = "0.13", default-features = false }
|
||||
|
||||
[features]
|
||||
default = ["debug"]
|
||||
|
||||
Binary file not shown.
@ -88,14 +88,14 @@ fn setup(
|
||||
#[derive(Component, Reflect)]
|
||||
pub struct BigSpaceDebugText;
|
||||
|
||||
fn ui_setup(mut commands: Commands, asset_server: Res<AssetServer>) {
|
||||
fn ui_setup(mut commands: Commands) {
|
||||
commands.spawn((
|
||||
TextBundle::from_section(
|
||||
"",
|
||||
TextStyle {
|
||||
font: asset_server.load("fonts/FiraMono-Regular.ttf"),
|
||||
font_size: 18.0,
|
||||
color: Color::WHITE,
|
||||
..default()
|
||||
},
|
||||
)
|
||||
.with_text_alignment(TextAlignment::Left)
|
||||
|
||||
@ -78,8 +78,7 @@ fn rotator_system(time: Res<Time>, mut query: Query<&mut Transform, With<Rotator
|
||||
}
|
||||
}
|
||||
|
||||
fn setup_ui(mut commands: Commands, asset_server: Res<AssetServer>) {
|
||||
let font = asset_server.load("fonts/FiraMono-Regular.ttf");
|
||||
fn setup_ui(mut commands: Commands) {
|
||||
commands.spawn(TextBundle {
|
||||
style: Style {
|
||||
align_self: AlignSelf::FlexStart,
|
||||
@ -90,9 +89,9 @@ fn setup_ui(mut commands: Commands, asset_server: Res<AssetServer>) {
|
||||
sections: vec![TextSection {
|
||||
value: "hello: ".to_string(),
|
||||
style: TextStyle {
|
||||
font,
|
||||
font_size: 30.0,
|
||||
color: Color::WHITE,
|
||||
..default()
|
||||
},
|
||||
}],
|
||||
..Default::default()
|
||||
|
||||
12
src/debug.rs
12
src/debug.rs
@ -41,13 +41,13 @@ pub fn update_debug_bounds<P: GridPrecision>(
|
||||
|
||||
for (cell, has_origin) in cells.values() {
|
||||
let cell = cell - origin_cell;
|
||||
let scale = Vec3::splat(settings.grid_edge_length * 0.999);
|
||||
let translation = settings.grid_position(&cell, &Transform::IDENTITY);
|
||||
gizmos.cuboid(
|
||||
Transform::from_translation(settings.grid_position(&cell, &Transform::IDENTITY))
|
||||
.with_scale(Vec3::splat(settings.grid_edge_length)),
|
||||
if *has_origin {
|
||||
Color::BLUE
|
||||
} else {
|
||||
Color::GREEN
|
||||
Transform::from_translation(translation).with_scale(scale),
|
||||
match *has_origin {
|
||||
true => Color::BLUE,
|
||||
false => Color::GREEN,
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user