bevy/crates
Alice Cecile b9123e74b6
Generalize bubbling focus input events to other kinds of input (#16876)
# Objective

The new `bevy_input_focus` crates has a tool to bubble input events up
the entity hierarchy, ending with the window, based on the currently
focused entity. Right now though, this only works for keyboard events!

Both `bevy_ui` buttons and `bevy_egui` should hook into this system
(primarily for contextual hotkeys), and we would like to drive
`leafwing_input_manager` via these events, to help resolve longstanding
pain around "absorbing" / "consuming" inputs based on focus. In order to
make that work properly though, we need gamepad support!

## Solution

The logic backing this has been changed to be generic for any cloneable
event types, and the machinery to make use of this externally has been
made `pub`.

Within the engine itself, I've added support for gamepad button and
scroll events, but nothing else. Mouse button / touch bubbling is
handled via bevy_picking, and mouse / gamepad motion doesn't really make
sense to bubble.

## Testing

The `tab_navigation` example continues to work, and CI is green.

## Future Work

I would like to add more complex UI examples to stress test this, but
not here please.

We should take advantage of the bubbled mouse scrolling when defining
scrolled widgets.
2024-12-18 01:04:50 +00:00
..
bevy_a11y Replace bevy_a11y::Focus with InputFocus (#16863) 2024-12-18 00:16:19 +00:00
bevy_animation Support tuple structs in AnimatedField (#16747) 2024-12-11 17:06:08 +00:00
bevy_app Rust 1.83, allow -> expect (missing_docs) (#16561) 2024-12-16 23:27:57 +00:00
bevy_asset Add AssetChanged query filter (#16810) 2024-12-17 18:57:08 +00:00
bevy_audio Move Volume and GlobalVolume to own file (#16838) 2024-12-16 19:28:30 +00:00
bevy_color Deny derive_more error feature and replace it with thiserror (#16684) 2024-12-06 17:03:55 +00:00
bevy_core Update hashbrown to 0.15 (#15801) 2024-12-10 19:45:50 +00:00
bevy_core_pipeline Implement bindless lightmaps. (#16653) 2024-12-16 23:37:06 +00:00
bevy_derive Rust 1.83, allow -> expect (missing_docs) (#16561) 2024-12-16 23:27:57 +00:00
bevy_dev_tools Draw the UI debug overlay using the UI renderer (#16693) 2024-12-11 00:49:47 +00:00
bevy_diagnostic Update sysinfo requirement from 0.32.0 to 0.33.0 (#16851) 2024-12-17 05:06:50 +00:00
bevy_dylib
bevy_ecs implement EntitySet and iter_many_unique methods (#16547) 2024-12-18 00:49:01 +00:00
bevy_encase_derive Rust 1.83, allow -> expect (missing_docs) (#16561) 2024-12-16 23:27:57 +00:00
bevy_gilrs Deny derive_more error feature and replace it with thiserror (#16684) 2024-12-06 17:03:55 +00:00
bevy_gizmos Fix registering all reflection types that are components as reflection components (#16800) 2024-12-16 19:16:43 +00:00
bevy_gltf Remove the meta field from LoadedAsset and ErasedLoadedAsset. (#15487) 2024-12-13 20:40:02 +00:00
bevy_hierarchy rename enqueue_command to queue_command for consistency (#16753) 2024-12-11 00:53:54 +00:00
bevy_image Rust 1.83, allow -> expect (missing_docs) (#16561) 2024-12-16 23:27:57 +00:00
bevy_input Expose text field from winit in KeyboardInput (#16864) 2024-12-17 22:42:54 +00:00
bevy_input_focus Generalize bubbling focus input events to other kinds of input (#16876) 2024-12-18 01:04:50 +00:00
bevy_internal Draw the UI debug overlay using the UI renderer (#16693) 2024-12-11 00:49:47 +00:00
bevy_log
bevy_macro_utils Use one BevyManifest instance in proc macros (#16766) 2024-12-15 15:00:05 +00:00
bevy_math f32 -> Rot2 in bounding volume docs (#16848) 2024-12-17 00:12:49 +00:00
bevy_mesh Rust 1.83, allow -> expect (missing_docs) (#16561) 2024-12-16 23:27:57 +00:00
bevy_mikktspace Rust 1.83, allow -> expect (missing_docs) (#16561) 2024-12-16 23:27:57 +00:00
bevy_pbr Update the prepass for the bindless lightmap changes. (#16855) 2024-12-17 19:21:12 +00:00
bevy_picking Rust 1.83, allow -> expect (missing_docs) (#16561) 2024-12-16 23:27:57 +00:00
bevy_ptr Fix MSRVs for standalone crates (#16333) 2024-11-17 09:38:13 +00:00
bevy_reflect bevy_reflect: Remove PartialReflect::serializable (#16576) 2024-12-16 23:29:46 +00:00
bevy_remote BRP strict field in query (#16725) 2024-12-14 05:22:19 +00:00
bevy_render Support scale factor for image render targets (#16796) 2024-12-17 20:21:40 +00:00
bevy_scene Add missing #[reflect(Component, Default)] to SceneRoot and DynamicSceneRoot. (#16816) 2024-12-15 19:18:22 +00:00
bevy_sprite Change GpuImage::size from UVec2 to Extent3d (#16815) 2024-12-17 19:08:09 +00:00
bevy_state Rust 1.83, allow -> expect (missing_docs) (#16561) 2024-12-16 23:27:57 +00:00
bevy_tasks Add no_std support to bevy_tasks (#15464) 2024-12-06 02:14:54 +00:00
bevy_text fix tiny copy-paste mistake in bevy_text::font_atlas_set (#16667) 2024-12-10 03:17:09 +00:00
bevy_time
bevy_transform track_change_detection: Also track spawns/despawns (#16047) 2024-12-17 04:46:31 +00:00
bevy_ui Change GpuImage::size from UVec2 to Extent3d (#16815) 2024-12-17 19:08:09 +00:00
bevy_utils Add no_std support to bevy_ecs (#16758) 2024-12-17 21:40:36 +00:00
bevy_window Replace bevy_a11y::Focus with InputFocus (#16863) 2024-12-18 00:16:19 +00:00
bevy_winit Replace bevy_a11y::Focus with InputFocus (#16863) 2024-12-18 00:16:19 +00:00