Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for bevy 0.13 and bevy_egui 0.25 #470

Merged
merged 7 commits into from
Feb 20, 2024

Conversation

Shute052
Copy link
Collaborator

@Shute052 Shute052 commented Feb 19, 2024

Simplified PR #463 to update for bevy 0.13 and bevy_egui 0.25.

Objective

Updates the dependencies to bevy 0.13 and bevy_egui 0.25.

Solution

Updates for bevy 0.13 and bevy_egui 0.25.

TODO

  • Document

Relevant PRs

Migration Guide

  • Both KeyCode-based logical keybindings and ScanCode-based physical keybindings are no longer supported; please migrate to:
    • KeyCodes are now representing physical keybindings.
    • InputKind::Keyboard has been removed.
    • InputKind::KeyLocation has been removed; please use InputKind::PhysicalKey instead.
    • All ScanCodes and QwertyScanCodes have been removed; please use KeyCode instead:
      • All letter keys now follow the format KeyCode::Key<Letter>, e.g., ScanCode::K is now KeyCode::KeyK.
      • All number keys over letters now follow the format KeyCode::Digit<Number>, e.g., ScanCode::Key1 is now KeyCode::Digit1.
      • All arrow keys now follow the format KeyCode::Arrow<Direction>, e.g., ScanCode::Up is now KeyCode::ArrowUp.

Changelog

  • Replaced all occurrences of bevy::input::Input, removed in Bevy 0.13, with bevy::input::ButtonInput.
  • Replaced all occurrences of the following bevy::input::KeyCodes, removed in Bevy 0.13, with:
    • Replaced all KeyCode::<Letter> with KeyCode::Key<Letter>, e.g., KeyCode::K is now KeyCode::KeyK.
    • Replaced all KeyCode::Key<Num> with KeyCode::Digit<Number>, e.g., KeyCode::Key8 is now KeyCode::Digit8.
    • Replaced all KeyCode::<Direction> with KeyCode::Arrow<Direction>, e.g., KeyCode::Up is now KeyCode::ArrowUp.
    • Replaced KeyCode::Return with KeyCode::Enter.
  • Removed ScanCode.
  • Removed QwertyScanCode.
  • Removed InputKind::Keyboard.
  • Removed InputKind::KeyLocation.
  • Added InputKind::PhysicalKey(bevy::input::KeyCode) for physical key bindings.
  • examples/physical_key_bindings has been removed.

examples/twin_stick_controller.rs

  • Ray3d::intersect_plane() now take a Plane2d rather than a Vec3 as the normal of the plane.
  • add_state has been renamed to init_state.

@Shute052
Copy link
Collaborator Author

Shute052 commented Feb 19, 2024

Changelog

  • Removed InputKind::Keyboard.
  • Removed InputKind::KeyLocation.
  • Added InputKind::PhysicalKey(bevy::input::KeyCode) for physical key bindings.

Or InputKind::KeyLocation(bevy::input::KeyCode) for physical key bindings?

@alice-i-cecile
Copy link
Contributor

Let's stick with PhysicalKey for now.

@alice-i-cecile alice-i-cecile added the dependencies Update dependencies label Feb 19, 2024
@alice-i-cecile alice-i-cecile added this to the 0.13 milestone Feb 19, 2024
@alice-i-cecile
Copy link
Contributor

Much cleaner diff now! Thanks for all the work you put into this <3

@alice-i-cecile alice-i-cecile merged commit c9181b6 into Leafwing-Studios:main Feb 20, 2024
4 checks passed
@Shute052 Shute052 deleted the bevy-0.13 branch February 20, 2024 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Update dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants