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"
[dependencies]
bevy_fmod = { branch = "update-0.12", git = "https://github.com/Salzian/bevy_fmod", features = ["live-update"] }
bevy = { version = "0.12", features = ["jpeg", "hdr", "serialize", "file_watcher"] }
bevy_fmod = { version = "0.4", features = ["live-update"] }
bevy = { version = "0.13", features = ["jpeg", "hdr", "serialize", "file_watcher"] }
serde = "1"
toml = { version = "0.8", features = ["parse"] }
anyhow = "*"
thiserror = "*"
winit = "0.28"
image = "0.24"
winit = "*"
image = "*"
gltf = "*"
[profile.dev]

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

@ -1,11 +1,5 @@
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
#[derive(Debug)]
pub(crate) struct Hit3d {

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

Loading…
Cancel
Save