Skip to content

Commit bc572cd

Browse files
authored
bevy_input_focus improvements (follow-up PR) (#16665)
This adds a few minor items which were left out of the previous PR: - Added synchronization from bevy_input_focus to bevy_a11y. - Initialize InputFocusVisible resource. - Make `input_focus` available from `bevy` module. I've tested this using VoiceOver on Mac OS. It works, but it needs considerable polish.
1 parent 912da04 commit bc572cd

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

crates/bevy_input_focus/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ pub struct InputDispatchPlugin;
107107
impl Plugin for InputDispatchPlugin {
108108
fn build(&self, app: &mut App) {
109109
app.insert_resource(InputFocus(None))
110+
.insert_resource(InputFocusVisible(false))
110111
.add_systems(Update, dispatch_keyboard_input);
111112
}
112113
}

crates/bevy_internal/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ bevy_ecs = { path = "../bevy_ecs", version = "0.15.0-dev" }
268268
bevy_state = { path = "../bevy_state", optional = true, version = "0.15.0-dev" }
269269
bevy_hierarchy = { path = "../bevy_hierarchy", version = "0.15.0-dev" }
270270
bevy_input = { path = "../bevy_input", version = "0.15.0-dev" }
271+
bevy_input_focus = { path = "../bevy_input_focus", version = "0.15.0-dev" }
271272
bevy_log = { path = "../bevy_log", version = "0.15.0-dev" }
272273
bevy_math = { path = "../bevy_math", version = "0.15.0-dev" }
273274
bevy_ptr = { path = "../bevy_ptr", version = "0.15.0-dev" }

crates/bevy_internal/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ pub use bevy_hierarchy as hierarchy;
4141
#[cfg(feature = "bevy_image")]
4242
pub use bevy_image as image;
4343
pub use bevy_input as input;
44+
pub use bevy_input_focus as input_focus;
4445
pub use bevy_log as log;
4546
pub use bevy_math as math;
4647
#[cfg(feature = "bevy_pbr")]

0 commit comments

Comments
 (0)