Skip to content

Commit

Permalink
Bump bevy_enhanced_input to 0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Shatur committed Jan 15, 2025
1 parent d2cc65f commit 4a3c250
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
9 changes: 4 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ project_harmonia_ui = { path = "ui" }
project_harmonia_widgets = { path = "widgets" }
bevy = { version = "0.15", default-features = false }
bevy_atmosphere = "0.12"
bevy_enhanced_input = "0.5"
bevy_enhanced_input = "0.6"
bevy_replicon = "0.29"
bevy_replicon_renet = "0.6"
bevy_mod_outline = "0.9"
Expand Down
3 changes: 2 additions & 1 deletion app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ walkdir.workspace = true
itertools.workspace = true
bitflags.workspace = true

# Don't enable "bevy_enhanced_input/egui_priority" until inspector updates.
[features]
inspector = ["dep:bevy-inspector-egui", "bevy_enhanced_input/egui_priority"]
inspector = ["dep:bevy-inspector-egui"]

[lints]
workspace = true
10 changes: 7 additions & 3 deletions base/src/game_world/player_camera.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,11 @@ impl InputContext for PlayerCamera {
))
.with_conditions(Chord::<EnablePanCamera>::default()),
))
.with_modifiers((DeadZone::default(), Scale::splat(0.7), DeltaLerp::default()));
.with_modifiers((
DeadZone::default(),
Scale::splat(0.7),
SmoothNudge::default(),
));

ctx.bind::<RotateCamera>()
.to((
Expand All @@ -164,7 +168,7 @@ impl InputContext for PlayerCamera {
.with_modifiers(Scale::splat(0.08))
.with_conditions(Chord::<EnableCameraRotation>::default()),
))
.with_modifiers((Scale::splat(0.05), DeltaLerp::default()));
.with_modifiers((Scale::splat(0.05), SmoothNudge::default()));

ctx.bind::<ZoomCamera>()
.to((
Expand All @@ -179,7 +183,7 @@ impl InputContext for PlayerCamera {
.with_modifiers_each(Scale::splat(0.1)),
Input::mouse_wheel().with_modifiers(SwizzleAxis::YXZ),
))
.with_modifiers(DeltaLerp::default());
.with_modifiers(SmoothNudge::default());

ctx
}
Expand Down
6 changes: 3 additions & 3 deletions base/src/game_world/segment/placing_segment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ fn round_placement(
placing: PlacingSegment,
point: Vec2,
) -> Vec2 {
let ctx = instances.get::<PlacingSegment>(entity).unwrap();
let free_placement = ctx.action::<FreeSegmentPlacement>().unwrap();
let ctx = instances.context::<PlacingSegment>(entity);
let free_placement = ctx.action::<FreeSegmentPlacement>();
if free_placement.state() == ActionState::Fired {
// Use raw result.
return point;
Expand All @@ -86,7 +86,7 @@ fn round_placement(
return point;
}

let ordinal_placement = ctx.action::<OrdinalSegmentPlacement>().unwrap();
let ordinal_placement = ctx.action::<OrdinalSegmentPlacement>();
let snap_angle = if ordinal_placement.state() == ActionState::Fired {
FRAC_PI_4
} else {
Expand Down

0 comments on commit 4a3c250

Please sign in to comment.