Fixing some bevy 0.13 errors

main
Elijah C. Voigt 2 years ago
parent 877f7001b1
commit e031ebd22a

2047
Cargo.lock generated

File diff suppressed because it is too large Load Diff

@ -5,14 +5,14 @@ edition = "2021"
build = "build.rs" build = "build.rs"
[dependencies] [dependencies]
bevy_fmod = { branch = "update-0.12", git = "https://github.com/Salzian/bevy_fmod", features = ["live-update"] } bevy_fmod = { version = "0.4", features = ["live-update"] }
bevy = { version = "0.12", features = ["jpeg", "hdr", "serialize", "file_watcher"] } bevy = { version = "0.13", features = ["jpeg", "hdr", "serialize", "file_watcher"] }
serde = "1" serde = "1"
toml = { version = "0.8", features = ["parse"] } toml = { version = "0.8", features = ["parse"] }
anyhow = "*" anyhow = "*"
thiserror = "*" thiserror = "*"
winit = "0.28" winit = "*"
image = "0.24" image = "*"
gltf = "*" gltf = "*"
[profile.dev] [profile.dev]

@ -7,13 +7,13 @@ impl Plugin for DebugPlugin {
app.add_plugins(( app.add_plugins((
FrameTimeDiagnosticsPlugin, FrameTimeDiagnosticsPlugin,
EntityCountDiagnosticsPlugin::default(), EntityCountDiagnosticsPlugin::default(),
SystemInformationDiagnosticsPlugin::default(), SystemInformationDiagnosticsPlugin,
)) ))
.init_resource::<DebugInfo>() .init_resource::<DebugInfo>()
.insert_resource(GizmoConfig { // .insert_resource(GizmoConfig {
depth_bias: -0.1, // depth_bias: -0.1,
..default() // ..default()
}) // })
.add_systems(Update, (aabb_gizmo,)) .add_systems(Update, (aabb_gizmo,))
// Systems that run in the editor mode // Systems that run in the editor mode
.add_systems( .add_systems(

@ -1,11 +1,5 @@
use crate::prelude::*; use crate::prelude::*;
/// Hit data for 2d sprites
#[derive(Debug)]
pub(crate) struct Hit2d {
_point: Vec2,
}
/// Hit data for 3d objects in Global (not Local) space and the distance from the Camera /// Hit data for 3d objects in Global (not Local) space and the distance from the Camera
#[derive(Debug)] #[derive(Debug)]
pub(crate) struct Hit3d { pub(crate) struct Hit3d {

@ -21,9 +21,6 @@ impl Plugin for UiPlugin {
} }
} }
#[derive(Debug, Component)]
struct UiRoot;
#[derive(Debug, Resource)] #[derive(Debug, Resource)]
pub(crate) struct UiFont { pub(crate) struct UiFont {
pub handle: Handle<Font>, pub handle: Handle<Font>,
@ -85,35 +82,32 @@ fn interactive_button(
.for_each(|(entity, mut ui_image, interaction)| match interaction { .for_each(|(entity, mut ui_image, interaction)| match interaction {
Interaction::None => { Interaction::None => {
ui_image.texture = resting_handle.clone(); ui_image.texture = resting_handle.clone();
texts let mut ts = texts.iter_many_mut(children.iter_descendants(entity));
.iter_many_mut(children.iter_descendants(entity)) while let Some((mut t, mut s)) = ts.fetch_next() {
.for_each(|(mut t, mut s)| { s.right = Val::Auto;
s.right = Val::Auto; info!("TODO: Change text color");
info!("TODO: Change text color"); info!("TODO: Change position");
info!("TODO: Change position"); }
});
} }
Interaction::Hovered => { Interaction::Hovered => {
ui_image.texture = depressed_handle.clone(); ui_image.texture = depressed_handle.clone();
writer.send(audio::AudioEvent::MenuHover); writer.send(audio::AudioEvent::MenuHover);
texts let mut ts = texts.iter_many_mut(children.iter_descendants(entity));
.iter_many_mut(children.iter_descendants(entity)) while let Some((mut t, mut s)) = ts.fetch_next() {
.for_each(|(mut t, mut s)| { s.right = Val::Px(0.0);
s.right = Val::Px(0.0); info!("TODO: Change text color");
info!("TODO: Change text color"); info!("TODO: Change position");
info!("TODO: Change position"); }
});
} }
Interaction::Pressed => { Interaction::Pressed => {
ui_image.texture = depressed_handle.clone(); ui_image.texture = depressed_handle.clone();
writer.send(audio::AudioEvent::MenuSelect); writer.send(audio::AudioEvent::MenuSelect);
texts let mut ts = texts.iter_many_mut(children.iter_descendants(entity));
.iter_many_mut(children.iter_descendants(entity)) while let Some((mut t, mut s)) = ts.fetch_next() {
.for_each(|(mut t, mut s)| { s.right = Val::Px(0.0);
s.right = Val::Px(0.0); info!("TODO: Change text color");
info!("TODO: Change text color"); info!("TODO: Change position");
info!("TODO: Change position"); }
});
} }
}); });
} }

Loading…
Cancel
Save