mirror of
https://github.com/bevyengine/bevy
synced 2024-11-21 20:23:28 +00:00
Made the naming for commands parameter more consistent (#14851)
# Objective Make the naming of a parameter more consistent. ## Solution - Changing the name of a parameter. ## Testing These changes can't be tested as they are documentation based. --- I apologize if something is wrong here, this is my first PR to bevy.
This commit is contained in:
parent
3e86787e93
commit
dbd226dc8a
1 changed files with 23 additions and 22 deletions
|
@ -27,33 +27,34 @@ struct ResolutionSettings {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Spawns the camera that draws UI
|
// Spawns the camera that draws UI
|
||||||
fn setup_camera(mut cmd: Commands) {
|
fn setup_camera(mut commands: Commands) {
|
||||||
cmd.spawn(Camera2dBundle::default());
|
commands.spawn(Camera2dBundle::default());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Spawns the UI
|
// Spawns the UI
|
||||||
fn setup_ui(mut cmd: Commands) {
|
fn setup_ui(mut commands: Commands) {
|
||||||
// Node that fills entire background
|
// Node that fills entire background
|
||||||
cmd.spawn(NodeBundle {
|
commands
|
||||||
style: Style {
|
.spawn(NodeBundle {
|
||||||
width: Val::Percent(100.),
|
style: Style {
|
||||||
|
width: Val::Percent(100.),
|
||||||
|
..default()
|
||||||
|
},
|
||||||
..default()
|
..default()
|
||||||
},
|
})
|
||||||
..default()
|
.with_children(|root| {
|
||||||
})
|
// Text where we display current resolution
|
||||||
.with_children(|root| {
|
root.spawn((
|
||||||
// Text where we display current resolution
|
TextBundle::from_section(
|
||||||
root.spawn((
|
"Resolution",
|
||||||
TextBundle::from_section(
|
TextStyle {
|
||||||
"Resolution",
|
font_size: 50.0,
|
||||||
TextStyle {
|
..default()
|
||||||
font_size: 50.0,
|
},
|
||||||
..default()
|
),
|
||||||
},
|
ResolutionText,
|
||||||
),
|
));
|
||||||
ResolutionText,
|
});
|
||||||
));
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This system shows how to request the window to a new resolution
|
/// This system shows how to request the window to a new resolution
|
||||||
|
|
Loading…
Reference in a new issue