fix(): fix button text
This commit is contained in:
parent
8f5281e5f2
commit
ade1a59cf2
|
@ -1,5 +1,5 @@
|
||||||
# Assets and songs
|
# Assets and songs
|
||||||
assets
|
assets/textures
|
||||||
songs
|
songs
|
||||||
|
|
||||||
# ---> Rust
|
# ---> Rust
|
||||||
|
|
Binary file not shown.
|
@ -1,6 +1,7 @@
|
||||||
use bevy::{
|
use bevy::{
|
||||||
prelude::*,
|
prelude::*,
|
||||||
window::PresentMode,
|
window::PresentMode,
|
||||||
|
winit::WinitSettings,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Component)]
|
#[derive(Component)]
|
||||||
|
@ -30,13 +31,14 @@ fn main() {
|
||||||
resolution:(640., 480.).into(),
|
resolution:(640., 480.).into(),
|
||||||
present_mode: PresentMode::AutoVsync,
|
present_mode: PresentMode::AutoVsync,
|
||||||
// Tells wasm to resize the window according to the available canvas
|
// Tells wasm to resize the window according to the available canvas
|
||||||
fit_canvas_to_parent: true,
|
fit_canvas_to_parent: false,
|
||||||
// Tells wasm not to override default event handling, like F5, Ctrl+R etc.
|
// Tells wasm not to override default event handling, like F5, Ctrl+R etc.
|
||||||
prevent_default_event_handling: false,
|
prevent_default_event_handling: false,
|
||||||
..default()
|
..default()
|
||||||
}),
|
}),
|
||||||
..default()}))
|
..default()}))
|
||||||
.add_plugin(HelloPlugin)
|
.add_plugin(HelloPlugin)
|
||||||
|
.insert_resource(WinitSettings::desktop_app())
|
||||||
.add_startup_system(setup)
|
.add_startup_system(setup)
|
||||||
.add_system(button_system)
|
.add_system(button_system)
|
||||||
.run();
|
.run();
|
||||||
|
@ -126,7 +128,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
|
||||||
parent.spawn(TextBundle::from_section(
|
parent.spawn(TextBundle::from_section(
|
||||||
"Button",
|
"Button",
|
||||||
TextStyle {
|
TextStyle {
|
||||||
font: asset_server.load("fonts/FiraSans-Bold.ttf"),
|
font: asset_server.load("fonts/LinLibertine_Rah.ttf"),
|
||||||
font_size: 40.0,
|
font_size: 40.0,
|
||||||
color: Color::rgb(0.9, 0.9, 0.9),
|
color: Color::rgb(0.9, 0.9, 0.9),
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue